Germany will face England in the last 16 of Euro 2020 after twice coming from behind to knock battling Hungary out of the tournament.
An outstanding header by Adam Szalai, who plays his club football in Germany for Mainz, had given Hungary a shock lead in Munich.
Andras Schafer thought he had won it for the Hungarians with a header – 90 seconds after Kai Havertz had equalised – before substitute Leon Goretzka made it 2-2 six minutes from the end.
It means Germany finish second in Group F and will now meet Gareth Southgate’s England at Wembley in a hugely anticipated last-16 match next Tuesday (17:00 BST).