Toni Kroos rescued Germany's World Cup hopes in dramatic fashion on Saturday, curling in a stunning free-kick deep in injury time to seal a 2-1 win against Sweden.
The defending champions were in desperate trouble when Ola Toivonen put the Swedes ahead in the first half and even though Marco Reus equalised shortly after the interval, Joachim Loew's men could not find the goal they craved as time ticked away.
Germany's task was made more difficult when key defender Jerome Boateng was sent off in the 82st minute for a second yellow card.
But Kroos stepped up in the 95th minute to curl a free-kick from the left edge of the penalty area into the top corner, beating the despairing dive of Robin Olsen, who had been outstanding in the Swedish goal.
The result in Sochi means Germany join Sweden on three points in Group F, with Mexico in the lead on six points after their earlier victory against South Korea, who have no points after two games.
The final games in the group on Wednesday pit South Korea against Germany and Mexico against Sweden.
Mexico showed that their shock defeat of Germany last weekend was no fluke with a 2-1 defeat of South Korea in Rostov-on-Don.
West Ham striker Javier Hernandez grabbed his 50th international goal while Los Angeles FC forward Carlos Vela was also on target from the penalty spot.
South Korea scored a late consolation strike from Tottenham's Son Heung-min, but it was too little, too late for the Asian giants, who desperately needed a victory after losing to Sweden in their opening game.
"Sometimes against teams that have less of a footballing tradition than the biggest nations, you can tend to rest on your laurels and lose concentration," said Mexico coach Juan Carlos Osorio.
"But it was a deserved victory. We are very happy and we share that with the whole of the country."
- Lukaku, Hazard strike -
Earlier, Belgium powered towards the last 16, producing an imperious display to overwhelm Tunisia, with Premier League stars Romelu Lukaku and Eden Hazard scoring two apiece in a 5-2 rout at Moscow's Spartak Stadium.
The one-sided victory cemented Belgium's place at the top of Group G and all but guaranteed their place in the knockout rounds, with just one group game, against England, remaining.
Manchester United striker Lukaku took his goals tally to the tournament to four as the Red Devils carved open Tunisia's defence with an impressive attacking display.
Chelsea playmaker Hazard fired Belgium into an early lead from the penalty spot before Lukaku found the net in the 16th minute, adding another on the stroke of half-time.
Hazard added another in the 51st minute before substitute Michy Batshuayi added the fifth in the 90th minute.
Dylan Bronn and captain Wahbi Khazri grabbed consolation goals for Tunisia, who now face almost certain elimination.
"We are a good team, we want to reach the final and we are stronger than four years ago," said Hazard, the man-of-the-match.
"The match was easy because we scored after five minutes and knew Tunisia would leave spaces as they needed to win, making it easier for us."
Belgium and England will qualify for the last 16 on Sunday if England defeat Panama in Nizhny Novgorod.
The fallout from Friday's politically charged clash between Switzerland and Serbia rumbled on Saturday.
Switzerland snatched a dramatic 2-1 win over Serbia on Friday courtesy of goals from Granit Xhaka and Xherdan Shaqiri.
Both Xhaka and Shaqiri, who have roots in Kosovo, a former province of Serbia that has declared independence in a move not recognised by Belgrade, celebrated their goals by making a gesture representing the Albanian flag.
The Serbian press slammed the celebrations as "shameful provocation."
Serbia coach Mladen Krstajic demanded German match referee Felix Brych be tried as a war criminal in The Hague after failing to award his team a penalty.
"We were robbed," Mladen Krstajic told Serbian reporters on Saturday, when asked about Brych's decision.
"I wouldn't give him either a yellow or red card, I would send him to The Hague. Then they could put him on trial, like they did to us."
The now-defunct Hague-based International Criminal Tribunal for the former Yugoslavia was a UN body that prosecutes the perpetrators of war crimes committed during the wars in the former Yugoslavia.
Toni Kroos celebrates after scoring Germany's late winner against Sweden in Sochi
Javier Hernandez scored his 50th international goal for Mexico
Romelu Lukaku scored twice to draw level with Cristiano Ronaldo on four goals