- Niclas Füllkrug (6')
- Kai Havertz (83')
- Joshua Kimmich (90'+1' Pen)
- Viktor Tsygankov (18', 56')
- Antonio Rüdiger (23' OG)
Viktor Tsyhankov had scored twice for Ukraine to come from behind and lead 3-1 in Serhiy Rebrov's debut as coach, putting his team on course for the country's first-ever win over Germany.
But Havertz pulled one back in the 83rd and was then fouled for a penalty that Joshua Kimmich converted in stoppage time for the equalizer.
The German soccer federation was donating the proceeds to victims of Russia's war in Ukraine. The match was also billed as the federation's 1,000th, but the team's performance will do little to restore battered German confidence a year before the country hosts the European Championship.
The buildup was overshadowed by the war in Ukraine with both teams taking to the field accompanied by children who had fled their country to escape the invasion.
Every visiting player was draped in a Ukrainian flag. The teams posed for individual photos -- with Ukraine's in front of another giant blue-and-yellow flag -- before German and Ukrainian players stood for a mixed photo behind a banner with the word "peace."
The German players also had a peace symbol on the arms of their jerseys.
Fullkrug was credited with the opening goal in the sixth when he deflected Marius Wolf's shot past Anatoliy Trubin in the visitors' goal.
Germany missed further good chances against the disorganized visitors before Tsyhankov equalized on a counter-attack in the 19th.
Mudryk forced an own goal from Antonio Rüdiger four minutes later to make it 2-1, delighting the visiting supporters. The Ukrainian ambassador to Germany, Oleksii Makeiev, celebrated with restraint beside German president Frank-Walter Steinmeier, who smiled and held out his hand to congratulate him.
Buoyed by the goals, Ukraine pushed for more before the home team recovered.
But it was a typical display of late from Germany -- seemingly in control, creating chances, yet still prone to costly mistakes.
Coach Hansi Flick reacted by bringing on Havertz and Lukas Klostermann for the second half, but little changed.
Artem Dovbyk capitalized on another mistake to set up Tsyhankov for the third goal in the 56th.
Further German mistakes led to whistles from some in the crowd, but they were finally given reason to cheer when Rüdiger sent a long ball forward for Havertz to score.
Havertz was then fouled as he pushed for the equalizer and Kimmich, the Germany captain, made no mistake from the spot.
- Anastasios Sidiropoulos