Joachim Löw’s team were expected to see off the threat of the African side with ease but laboured to a 2-1 extra-time victory in Porto Alegre to set up an enticing last-eight clash with France.

“Would you rather we played beautiful football but got knocked out?” Mertesacker said to Germany’s ZDF television, visibly frustrated by the critical line of questioning.

“I don’t know what you want from me – do you think that just Mickey Mouse teams are involved in the last 16? All that matters is we’re in the quarter-finals.”

Had it not been for an excellent performance from Manuel Neuer, however, Germany may have been leaving Brazil earlier than they expected.

“Algeria did a really good job,” said Chelsea’s Andre Schürrle, who scored the opening goal early in extra time, with Mesut Özil’s strike just before the end ensuring that Abdelmoumene Djabou’s last-gasp strike was in vain.

“But it doesn’t matter how we’ve done it, the main thing is we’re in the quarter-finals. There was a bit of luck involved in my goal and now we’ve got to play better than this against France.”

It was not all negative, though, according to the captain, Philipp Lahm, who felt Germany should have sealed victory without the need for an additional 30 minutes.

“If you don’t take your chances, then you’ve got to go into extra time, and we had some huge chances in the second half,” he said. “But we knew beforehand that it was going to be hard, and that’s precisely how it was.”

Löw praised his players’ spirit but saw plenty of room for improvement. “We lost too many balls,” the coach said. “We made lots of passing mistakes and that invited them to hit us on the counterattack.

“We were susceptible on long balls and it was good that Manuel [Neuer] kept coming off his line. But this was a victory of our will and strength of character. I just need to take a deep breath now.”