MOSCOW (TNS) — Mexico is going on and Germany is going home. Both had South Korea to thank for that Wednesday after a wild day of World Cup surprises that eliminated the defending champion and breathed new life into a team that thought it was dead.

Mexico, needing only a point to win Group F and advance to the next round, was pummeled 3-0 by Sweden. Germany, needing only a goal to push Mexico aside and take its spot in the second round, was shut out 2-0 by South Korea.

When the dust settled, Mexico was headed to the round of 16 for the seventh consecutive World Cup while Germany was out after the group stage for the first time ever. That left Mexican players crying in Yekaterinburg, exhausted South Korean players littering the field in Kazan and German coach Joachim Low looking for a place to hide, his 12-year reign atop the national team likely over.

Lost in the confusion was the fact that Sweden was the only country that really had reason to celebrate since its rout of Mexico made it the group champion. Sweden will meet Switzerland in its second-round game next week in St. Petersburg.

Mexico, as the group runner-up, travels to Samara to meet Brazil on Monday. For South Korea, like Germany, the World Cup is over.

"Thank God," forward Hirving Lozano said. "(Korea) gave us the qualification. We now have to think about the next round and the opponent we have next. "

Added Miguel Layun: "It was a weird sensation. It's a bittersweet moment, but we are in the round of 16."

Playing in Yekaterinburg, Russia's easternmost World Cup city, Mexico got off to a poor start with Jesus Gallardo drawing a yellow card just 13 seconds after kickoff, the quickest caution in World Cup history.

Mexico entered Wednesday needing only a draw to win the group after defeating Germany and South Korea earlier in the tournament, yet it did not play cautiously, attacking for most of the afternoon. Though it outshot Sweden and finished with a 2-to-1 advantage in time of possession, it had nothing to show for that on the scoreboard.

That allowed Sweden to break open a tight game in the second half with goals from Ludwig Augustinsson and Andreas Granqvist as well as an own goal by Mexican defender Edson Alvarez.

That left the door open for Germany, which entered the final minutes in Kazan, 500 miles to the west, well aware of Mexico's troubles and knowing it needed only to score to claim its spot in the second round. The fact that it didn't get it wasn't for a lack of effort, with Germany peppering the Korean net with five shots in the final seven minutes of regulation.

After Marco Reus missed with a right-footed shot from outside the box, Julian Brandt's shot from the left side was blocked two minutes later. Toni Kroos, the Game 2 hero, then sent a shot over the crossbar, Mats Humels missed on a header before a shot by Kroos landed in the hands of Korean keeper Jo Hyeon-Woo, one of his six saves on the day.

Germany's tournament then died two minutes into stoppage time when Korean defender Kim Young-gwon scored on a scramble in front of the goal. The score was originally waved off by an offside call, but after consulting a video replay, American referee Mark Geiger correctly ruled the ball had struck a German defender before bounding to Kim.

The goal counted. Germany's reign as champion was all but over.

After Low waved keeper Manuel Neuer forward to join in the attack, South Korea scored an insurance goal into an unguarded net to put the final nail into Germany's coffin, sending it home humbled and humiliated.

"We deserve to be eliminated," said Low, whose team was shut out twice in three games in Russia. "For us, this is a huge disappointment. But we have young players who are talented and have the potential to go forward.

"It happened to other nations before. We need to draw the right conclusions."

Germany had made it to the quarterfinals of the last nine World Cups and the semifinals of the last four. This time it was eliminated in the group stage, its earliest exit in 80 years, and finished at the bottom of the table.

"I couldn't imagine that we would lose," Low said. "We need a couple of hours to see things clearly. The disappointment is deep inside me."

In the relieved Mexican locker room, neither coach Juan Carlos Osorio nor his players apologized for backing into the second round.

"We qualified because we beat great rivals like Germany and Korea," the coach said in Spanish.

After it got the news from Kazan, however, Mexico started looking forward, not back, because unlike Germany, it has another game to play.

"We know that it is a very short tournament," forward Marco Fabian said. "We can't be thinking too much about what happened today, just like we couldn't think about it too much about what we did with Germany.

"We have to turn the page. We have to think that in five days we are going to have the game of our lives."