German fans celebrate in Berlin

The desperate world champions from Germany were seconds from losing control of their World Cup fate when Toni Kroos whispered to Marco Reus just outside Sweden’s penalty area.

With the score tied in the fifth minute of stoppage time, Kroos seemed to remind Reus of a trick play from training that will live in World Cup lore.

Down to 10 men after Jerome Boateng was given a second yellow card, Germany rallied for a 2-1 victory over Sweden on Saturday to suddenly revive its title defense thanks to a strike from Kroos that caught the Swedes by surprise and won’t soon be forgotten in Germany.

And Germany fans who were watching the match in Berlin went crazy after the Real Madrid midfielder’s goal.

Kroos lined up for a free kick as if he was going for goal but just tapped the ball to Reus, who held it with his toe as the defenders paused.

Kroos swung his right foot, curling the ball past a spinning Sebastian Larsson and over the outstretched hand of diving goalkeeper Robin Olsen.

The Swedes watched the ball go in, mouths open in disbelief.

The Germans ran to Kroos and erupted in emotional relief.

Coming off an opening loss to Mexico, Germany fell behind again when Kroos’ early mistake led to Ola Toivonen’s goal in the 32nd minute. Reus equalized in the 48th.

A point for a draw would have been enough to stay alive for the knockout stage, but the Germans would have needed help on the final day.

Now Germany has some control of what happens. Mexico leads Group F with six points, and Germany and Sweden both have three.

Mexico faces Sweden and Germany takes on winless South Korea in the final group matches.

Crazy as it seems, all four teams still have a chance to advance on the final day.

For 90-plus minutes, Germany looked as if it would enter the final match facing the same possible fate as Spain and Italy and potentially become the third straight defending champion to fail to reach the knockout stage.

They played the final 10 minutes without Boateng.

Toivonen gave Sweden the lead, but Germany controlled every aspect by playing aggressive and attacking soccer.

Germany forced Sweden to play defensively for almost the entire second half and eventually the attack paid off.

Reus scored to pull Germany even, finishing Timo Werner’s cross that was tapped by halftime substitute Mario Gomez and caused the ball to pop up perfectly for Reus to finish with his leg.

Olsen made a major save by stopping Gomez’s header in the 88th minute and Julian Brandt hit the post in the 90th, but he had no chance at Kroos’ strike.