A deflected goal from Emil Forsberg was enough to take Sweden into the Word Cup quarterfinals as they beat Switzerland 1-0 in a scrappy match in St Petersburg.
With the game deadlocked, Forsberg found space on the edge of the area and his 66th-minute shot looped in off defender Manuel Akanji to set up a clash with either Colombia or England.
In the first minute, after Sweden had lost possession, Xherdan Shaqiri drilled a speculative strike wide from outside the area.
Moments later it was Sweden's turn to threaten, Marcus Berg put through but sending his attempted half-volley from an angle wildly off target.
With 10 minutes gone, confusion in the Swiss area saw the loose ball drop to Albin Ekdal, whose fierce strike was too high, and Blerim Dzemaili sent a tame effort straight at Robin Olsen at the other end.
Shaqiri tried to turn provider after 15 minutes, but his cross from the right was over the leaping Valon Behrami and another centre was headed over by Steven Zuber.
Mikael Lustig's clearance kept a dangerous-looking cross away from Zuber before, as the half-hour approached, Yann Sommer made a fine low save to keep out Marcus Berg's bouncing strike.
Lustig was booked for a needless foul before Ricardo Rodriguez shot straight at Olsen and Xhaka tried his luck from range once more, this time lofting over.
With a little over five minutes left until the break, Switzerland should have taken the lead but Zuber's cross from the left was blasted over by Dzemaili.
Back came Sweden, winning a dangerous free kick about 30 yards out, Forsberg seeing his effort deflect off the wall and past the far post.
And from the corner Sweden missed the game's best chance so far, Lustig crossing to the far post where the unmarked Albin Ekdal sent a first-time volley horribly high from only six yards out.
With the final action of the first period, Rodriguez crossed from the left and Olsen lost the ball but Sweden scrambled it away.
Ola Toivonen fired over when a deep cross was headed down in the early moments of the second half, and then a neat move from Switzerland saw Rodriguez cross and the ball deflect behind for a corner that came to nothing.
The second period was increasingly uneventful, Ekdal failing to control a pass with space opening up ahead of him as the match degenerated into scrappiness.
But after 66 minutes the breakthrough came when Forsberg found space on the edge of the area, received a square pass and saw his scuffed strike clip off Akanji and sail high beyond Sommer.
Xhaka was booked for pulling back Viktor Claesson as Sweden looked to break, and then Shaqiri's strike from inside the area was blocked and deflected wide.
With 73 minutes gone Switzerland made a double change, Breel Embolo and Haris Seferovic on for Zuber and Dzemaili.
Embolo was swiftly into the action, winning a corner after a run down the left, but when the ball was played back in after an initial block Shaqiri saw another strike crash to safety off a defender.
With 10 minutes to go, Embolo had a header scrambled away from almost on the line by Forsberg who, along with Lustig, was substituted in a double change as time ticked away, Emil Krafth and Martin Olsson coming on.
Isaac Thelin came on and Marcus Berg off as Sweden ran down the clock, and in the last seconds Olsson was fouled by Michael Lang as he burst through, with Lang sent off.
The initial decision of penalty was overturned in favour of a free kick just outside the area and, with the last action of the match, Toivonen's powerful strike was saved by Sommer.