Despite taking a hefty lead with Mertesacker and Ozil adding to Klose's double, the CSKA midfielder completed a magnificent fightback with a stoppage-time equaliser
Miroslav Klose got the hosts off to a brilliant start as he netted two early goals, putting him one strike away from equalling Gerd Muller's record of 68 goals for the national team. Per Mertesacker added another before the break and soon after the restart Mesut Ozil gave Joachim Low's side a comfortable lead.
The Swedes responded impressively in the second-half and staged a magnificent comeback, with Erik Hamren's half-time substitutions having a great effect as they had a hand in all the goals. Strikes from Zlatan Ibrahimovic, Mikael Lustig and Johan Elmander set up a tense finish and the visitors completed an astounding recovery in stoppage time through Rasmus Elm.
But the first-half could not have contrasted more starkly as, following their 6-1 thumping of the Republic of Ireland, Germany got straight into their stride. Less than two minutes had been played when Andreas Isaksson stopped Thomas Muller and the follow-up effort crashed off the post.
The Blagult had no such luck on the next German attack as die Mannschaft took the lead in the eighth minute. Philipp Lahm played Marco Reus in at the byeline and his cutback was smashed into the top corner by Klose to finish a brilliant move.
Things only got better for the hosts as Klose added his second in the 15th minute following some intricate one-touch play. Reus initiated the move, slaloming his way into the box with two successive one-twos, before pulling the ball back to the 34-year-old who fired home at the second time of asking.
After stepping off the gas midway through the half Low's men soon reasserted themselves and following Isaksson's save to keep Reus out, they got their third in the 39th minute. A cross from the left was kept in play at the back post by Muller, whose looped header was rifled past the keeper by an unmarked Mertesacker.
Germany did not let up after the break and after Muller was once again denied by Isaksson, a four-goal cushion was achieved in the 56th minute. At the end of a swift break, Muller delivered a cross that found Ozil at the back post. The Real Madrid man controlled the ball on his chest before angling a shot into the far corner.
The match appeared dead and buried, but Sweden pulled a goal back in the 62nd minute as Ibrahimovic beat the offside trap to steer a header past Manuel Neuer from Kim Kallstrom's ball forward.
Seemingly galvanised by that goal, another ball over the top, again courtesy of Kallstrom, created another chance for the visitors. Lustig controlled it well and with his second touch powered a shot at Neuer that somehow squirmed into the goal.
Extraordinarily, the Swedes came to within one goal of the hosts, stunning the Berlin crowd in the process. In space on the left, Alexander Kacanikilic picked out Elmander who beat Holger Badstuber to the ball and poked it in at the far post.
Tobias Sana blazed over in front of an open goal in the 85th minute but unperturbed, Sweden found the equaliser at the death. A cross from the left was not dealt with by Mertesacker and his loose header fell to Elm who volleyed in to complete the fightback.
The result means Germany have surrendered their 100 per cent record in Group C but remain three points clear of second-placed Sweden in the race for a place at World Cup 2014.