Germany dodged a fatal bullet on Saturday, coming back from a goal down to Sweden to steal a 2-1 victory at the 2018 World Cup and keep their world title defense alive… barely.

For all of 16 minutes — plus halftime — the Germans were in line to be eliminated with one Group F game still to play, but ultimately, Ola Toivonen‘s unlikely opener was canceled out by Marco Reus in very short order after the restart, and Toni Kroos broke Swedish hearts in the 94th.

Put another way, Joachim Loew survives to manage another day.

[ MORE: Latest 2018 World Cup news ]

Sweden felt massively aggrieved to have not been awarded a penalty kick in the 17th minute, when Jerome Boateng took out the legs of Marcus Berg as he bore down on an out-rushing Manuel Neuer. The combination of leg-to-leg contact and a strong push in the back appeared an obvious error for the video-assistant referee to right a wrong, but the call never came.

The opening goal was the direct result of a careless giveaway by Kroos near the center circle, and needed just three touches and two passes to cut through the German defense and spring Toivonen behind Antonio Rudiger. The finish, a perfectly weighted dink — perhaps aided by the slightest of deflections by Rudiger — left Neuer with no chance (WATCH HERE).

Then, with the final touch of the first half, Berg glanced a header from a free kick that was destined to his the inside netting at the far post, but Neuer redefined the phrase “at full stretch” to keep the scoreline 1-1.

Click here for live and on demand coverage of the World Cup online and via the NBC Sports App.

That save proved invaluable for Joachim Loew’s side, as Marco Reus pulled the defending world champions level less than three minutes into the second half. Timo Werner dribbled to the endline and cut the ball back toward the penalty spot, and Reus got on the end of the deflected cross and struck it home with his knee. A semblance of order restored.

Bedlam ensued in the final 15 minutes, as Boateng was sent off for a second yellow card and Neuer lost his footing while scrambling across the face of goal to make a save, only narrowly preserving the 1-1 scoreline. Robin Olsen one-upped Neuer in the 88th minute, rising to his crossbar to punch Mario Gomez’s header just over.

In the fourth of five minutes of second-half stoppage time, Kroos became the hero. From a nearly impossible angle on the left side of the penalty area, Kroos rolled the ball forward to Reus on the restart, creating an ever so slightly wider angle from which to curl his shot toward the far post. It worked to perfection.

[ LIVE: World Cup scores ]

Germany (3 points) will finish group play against fourth-place South Korea (0 points) on Wednesday, while Sweden (3 points) will face Mexico (6 points), who had clinched their place in the knockout rounds until Germany’s late winner.

Follow @AndyEdMLS