An early Mats Hummels goal proved enough for three-time champions Germany to beat France in Rio de Janeiro and become the first team through to the 2014 FIFA World Cup semi-finals.
The Borussia Dortmund centre-back made the difference by glancing in Toni Kroos's 13th-minute free-kick as Joachim Löw's side edged past Les Bleus in the all-European quarter-final at the Estádio do Maracana.
Although Hummels almost inadvertently headed into his own goal in the second half, Germany could have doubled their lead before clinching their place in a semi-final against either Brazil or Colombia.
Karim Benzema sidefooted wide from Mathieu Valbuena's pass and Antoine Griezmann came close to teeing up the three-goal forward before Germany struck.
From Kroos's inswinging delivery, Hummels – recalled along with Sami Khedira and Miroslav Klose – outstrengthed Raphaël Varane to angle a header off the underside of Hugo Lloris's crossbar and in for the breakthrough.
Didier Deschamps's men might have equalised when Valbuena drew a save from Manuel Neuer following Griezmann's assist, with Hummels in the right place to stop Benzema on the rebound. From Paul Pogba's ball, Benzema also cut inside only to fire straight at the keeper as half-time beckoned.
The second half began with an untaken headed opportunity for Patrice Evra from Valbuena's set piece. Varane later made a stronger connection, albeit nodding into Neuer's hands, after France recycled possession from a corner won by Blaise Matuidi.
The latter player tested Neuer too, not long after Benzema had been frustrated by Hummels amid increased French pressure.
At the other end Thomas Müller threatened his fifth finals goal with a shot that drifted narrowly wide after Die Mannschaft picked up on a Mamadou Sakho mistake. Substitute André Schürrle also dragged an effort into Lloris's midriff as an even contest reached a crescendo.
Schürrle had an even better chance from a breakaway spearheaded by Mesut Özil and Müller, but his attempt was repelled by Lloris. N
ext Varane threw himself in the way of Schürrle's strike – though the outstanding late opening fell to Benzema whose drive was parried one-handed by Neuer at the death.