Leon Goretzka scored in the 84th minute after Timo Werner’s shot was blocked following a run through Jamal Musiala’s defense.
This gave the Germans a 2-2 draw against Hungary on Wednesday, enough for them to finish second in the group. A loss would have sent the Hungarians to the next round and sent Germany home early for the second consecutive major tournament.
“It was nothing for weak nerves,” said German coach Joachim Low, who is retiring after Euro 2020 but certainly made the right choices on a rainy night in Munich.
Goretzka came off the bench in the 58th minute, Werner followed in the 67th and Musiala came on in the 82nd.
Three years after being knocked out of the 2018 World Cup group stage, Germany can now expect a trip to London to face England on Tuesday in the round of 16 at Wembley Stadium.
“There is hardly a more beautiful game,” said German midfielder Joshua Kimmich. “Whether it’s in the round of 16… we’re really looking forward to it. Hope we finally got to the tournament. “
It looked like Adam Szalai would lead Hungary into the round of 16. The team captain scored an early goal against the run of play, then allowed Andras Schafer to make it 2-1 just after Kai Havertz equalized for Germany.
“We made mistakes but we fought until the equalizer was there. Morale was amazing, ”Low said.
Germany got off to the best start but fell behind again early when Szalai met Roland Sallai’s cross with a flying header on a counterattack in the 11th.
On the other side, the home side struggled against the Hungarian defensive formation 5-3-2.
“You could see that they defended very well against Portugal and France for long stretches,” said German goalkeeper Manuel Neuer. “It was a multi-leg defense. “
The Germans also seemed to miss Thomas Muller’s unpredictability. He was on the bench with a knee injury suffered in the 4-2 win over Portugal. Leroy Sane started in his place, the only change Low made from the teams that started the previous two games.
Germany had to wait for the 66th when the excellent Peter Gulacsi failed to repel Toni Koos’ free kick. Mats Hummels directed the ball forward and Havertz made sure at point blank range.
The celebrations were cut short, however, as Hungary responded immediately when Szalai played Schafer to head Neuer past.
“That never has to happen if you want to achieve something in a tournament like this,” Goretzka said.
That would have been enough to send Hungary to the next round at the expense of Germany, but Low’s substitutes saved the game and kept him in his post for at least a few more days.
Portugal drew 2-2 with France in the other group game and both advanced, while Hungary finished last with two points and were eliminated.
“The group we had was probably the hardest you can get in Europe,” Gulacsi said. “Nevertheless, we were on track to progress until the 84th minute. The little things decide in the end. We never imagined before the tournament that we would be so close. Now, of course, it’s bitter. “
Before kick-off, a person with a rainbow flag ran across the pitch and waved it in front of the Hungarian team while the country’s national anthem was played. The person was quickly approached by the flight attendants and tackled to the ground, then taken away to cheers and applause.
The build-up to the match had been overshadowed by an argument over Munich city council’s request to light up the stadium in rainbow colors. UEFA refused on the grounds that it was a political statement directed directly against Hungary.
Many German supporters carried small rainbow flags which were handed out by activists before the match.