The world champions went a goal down after 32 minutes and although Marco Reus equalized three minutes into the second half, their hopes of retaining the title were hanging by a thread until Toni Kroos popped up in the fifth minute of stoppage time to score a sensational winner.
Fans filing out of Sochi’s Fisht Stadium could not get enough of chanting the midfielder’s name as they celebrated a much-needed win to keep their hopes for a repeat alive.
The same emotions were felt by Germany fans in Moscow’s fan zone.
Somber Swedish fans, on the other hand, were left to hope for better days when they face Mexico on June 27 in Yekaterinburg.
Germany will play South Korea in Kazan on the same day to determine which of the teams will continue on to the knockout round.