Lars Stindl rescued a draw in stoppage time to extend Germany's unbeaten run to 21 matches as the World Champion twice came from behind to earn a 2-2 draw with France in Cologne.
Stindl, an 83rd-minute replacement for Emre Can ensured Joachim Low's finished 2017 without tasting a single defeat, its last loss coming at the hands of France in the European Championship semifinal last year.
That run looked like coming to an end when Alexandre Lacazette netted twice on Tuesday — the Arsenal striker profiting from Anthony Martial's brilliant footwork for his first before Kylian Mbappe created his second.
In between the Arsenal striker's brace Timo Werner levelled for the host as he broke the French offside trap to sweep home a Mesut Ozil pass.
But a second goal looked too much for the host as the game entered stoppage time, however substitute Stindl had other ideas as he fired low past Steve Mandanda just 10 minutes after coming on.
Joachim Low will hope to see better defending when his side faces Spain and Brazil before it begins its World Cup defence in Russia, but its battling spirit will give the coach plenty of encouragement.
A Germany side showing six changes from its draw with England took time to settle and that allowed France to have the better of the opening exchanges, although it initially failed to stretch Kevin Trapp.
Kylian Mbappe may well have done when he found space in the 12th minute, but Mats Hummels came to Germany's rescue with a perfectly executed sliding tackle.
Lacazette — preferred in attack to Antoine Griezmann — eventually tested Trapp just before the half-hour mark, while at the other end an important block from Raphael Varane denied Ozil.
Minutes later Trapp had to be alert again to keep Mbappe out low to his right, the Paris-Saint Germain goalkeeper denying his club-mate after a neat Cruyff turn in the penalty area.
Finally, in the 33rd minute, the goal France's pressure deserved came, Martial dancing past Niklas Sule before touching the ball wide of Trapp for Lacazette to apply a simple finish.
Half-time substitute Antonio Rudiger should have brought Germany level seven minutes after his introduction, but the Chelsea defender skewed his effort wide after great work down the left from Julian Draxler.
Germany did not have to wait long for its equaliser as Ozil led a swift counter-attack, his pinpoint throughball releasing Werner and the RB Leipzig forward calmly slotted under Mandanda.
Almost immediately Martial thought he had restored France's lead, but Trapp got down brilliantly to push away his dipping strike.
A Kroos free-kick rattled Mandanda's bar with 20 minutes to play but while the Real Madrid midfielder was wondering how it stayed out, France scored.
Rudiger inexplicably left Lacazette in acres of space 20 yards from goal and the 26-year-old beat Trapp again after being found by Mbappe's pass.
Low introduced Mario Gotze for his first international appearance in just shy of a year and he came good with a superb assist for Stindl, who kept its run going by sliding home a neat 93rd-minute finish.
- Asia Cup 2023: Bangladesh’s Mushfiqur to miss Super Four India match
- AFC Champions League: Mumbai City FC to face Al Hilal October 23, Neymar might play in India on November 6
- AFC Cup 2023-24: When are Mohun Bagan SG and Odisha FC playing in Asia?
- Saina Nehwal: Paris Olympic qualification tough but retirement is not on mind
- Asia Cup 2023: Who will play India if PAK vs SL match is washed out?