Germany survived a huge test of their World Cup credentials to see off underdogs Algeria in extra time and set up a quarter-final meeting with France.
The three-time champions lacked urgency throughout the 90 minutes. They frequently looked rattled as an enterprising Algeria wasted a succession of chances in an open, exciting encounter, before Andre Schurrle finished from close range early in the first additional period.
Mesut Ozil drilled in to double their lead and, although Abdelmoumene Djabou volleyed home to ensure a frantic end, a relieved Germany held on and will take on the French in Rio on Friday.
The result looked inevitable once an impressive Algeria side began to tire, but Joachim Low’s men will have to improve dramatically if they are to secure a first World Cup since 1990.
Germany are into the last eight for the 17th time in 18 World Cup appearances, but they lacked the fluency and cutting edge that has seen them installed among the tournament favorites.
Algeria could not mark their first experience of the knockout stage with a win, meaning Africa’s representation in Brazil is over, but they depart with immense credit for a superb campaign.
The build-up was dominated by talk of them seeking revenge for 1982, when West Germany’s convenient 1-0 win against Austria saw them both reach the second round at Algeria’s expense.