Sweden advanced to the World Cup round of 16 as Group F winners after a 3-0 win over Mexico, who still advanced thanks to Germany's defeat to South Korea on Wednedsay.
Sweden erupted for three goals in the second half through Ludwig Augustinsson, an Andreas Granqvist penalty and an own goal from Edson Alvarez, putting Mexico on the brink of elimination.
But Germany failed to score in the simultaneous game, and South Korea's stoppage-time goals ensured Mexico advanced as group runners-up despite their capitulation against Sweden.
The game began with an ominous start for Mexico as Jesus Gallardo was shown the fastest yellow card in World Cup history after just 13 seconds for an elbow to Ola Toivonen.
Five minutes later, Guillermo Ochoa was whistled for handling the ball just outside of his box, and as a result was forced to make a big save to stop Emil Forsgberg's free kick.
Sweden striker Marcus Berg also came close as he tried to flick the ball over his head with his back to goal but sent it wide.
Mexico went on the front foot on 17 minutes when Javier Hernandez intercepted the ball, but Carlos Vela's shot curled just wide.
Sweden were nearly handed a penalty in the 29th minute when Hernandez appeared to handle the ball in the box, but the referee waved it away after consulting with the video review system, though Ochoa was called upon again to deny Berg following to ensuing corner.
Mexico attacked for the rest of the first half, with Lozano's shot blocked, Vela blasting over the bar and Miguel Layun's soft shot easily gathered.
But the second half belonged to Sweden, and Augustinsson found the breakthrough after just five minutes. Viktor Claesson touched a low cross through the box with his back heel and it flipped up and fell for Augustinsson to score.
Sweden were then granted a penalty on the hour mark when Hector Moreno clattered into Berg in the box, and Granqvist doubled the lead from the spot.
Alvarez then misplayed a cross in the six-yard box to hand Sweden a third goal, and though Mexico tried to respond, at that point they were more concerned with the result in the other match, as a Germany win would have put El Tri out of the competition.
Word of a late South Korea goal arrived at the stadium in stoppage time, providing a massive relief for Mexico and their fans.
Sweden will play Group E runners-up Switzerland, who drew 2-2 with Costa Rica on Wednesday, in the round of 16 on July 2.