COLOGNE, Germany — Germany substitute Lars Stindl scored in the last minute of injury time to salvage a 2-2 draw against France on Tuesday, preserving the world champions' 21-game unbeaten run.

Alexandre Lacazette's two goals looked to be sending Germany to its first defeat since losing to France in their Euro 2016 semifinal in Marseille. But Mesut Ozil played a fine through-ball to Mario Goetze, who flicked the ball on for Stindl to fire home.

Germany coach Joachim Loew is bound to be concerned by his side's lacklustre display in the first-half, when France showed all the initiative.

The visitors provided an example of what Loew wants to achieve, defending well and breaking forward with purpose and effect.

Anthony Martial and Kylian Mbappe might have opened the scoring near the half-hour mark when they faced Niklas Suele alone on a counterattack, but Martial delayed his pass too long and Mbappe couldn't help straying offside.

Mbappe then forced a save from Paris Saint-Germain teammate Kevin Trapp before Lacazette finally broke the deadlock 10 minutes before the break.

Lucas Digne cut Blaise Matuidi's cross-field ball back for Martial, who eluded Suele with a wonderful piece of skill and offered Lacazette a simple tap-in.

Germany emerged with more purpose after the break and equalized thanks to Ozil. The midfielder waited for the perfect time to play his pass for Timo Werner to run onto and shoot through goalkeeper Steve Mandanda's legs.

At the other end, Trapp denied Martial an immediate response with a brilliant save.

Germany's Toni Kroos rattled the crossbar with 20 minutes remaining before Ozil's Arsenal teammate Lacazette claimed his second goal of the nighr, scoring through Trapp's legs after Mbappe had played him in.

However, another moment of skill from Ozil helped save Germany's blushes and earn a morale-boosting draw.