Sara Daebritz scored the only goal of the game as Germany beat Spain 1-0 in their Women's World Cup Group B match on Wednesday to all but secure a spot in the next round.
The two-time champions, who beat China in their group opener, are on six points, with Spain in second on three. China and South Africa, who play each other on Thursday, have no points. Spain had more possession, but Germany looked more dangerous despite missing the injured Dzsenifer Marozsan.
Daebritz grabbed the winner on the rebound in the 42nd minute, sliding in to push the ball over the line after Spain keeper Sandra Panos had blocked an Alexandra Popp header.
Spain made the better start and went close to scoring early on but Nahikari Garcia failed to beat Almuth Schult when one-on-one with the Germany keeper.
Germany improved after the break, especially following the introduction of 18-year-old Klara Buehl, who gave them more pace and attacking options.
"We did not start well, we were nervous for some reason. We were lucky not to fall a goal behind," said Germany coach Martina Voss-Tecklenburg.
"Thank God we scored and then we delivered an amazing-energy performance in the second half. The important thing now is we have six points in this group."
Germany are unbeaten in their last 14 matches, the longest run of any team in France.
Germany play South Africa next while Spain take on China.