Liverpool midfielder Dominik Szoboszlai scored a Panenka penalty in the ninth minute of stoppage time as Hungary grabbed a late equaliser to deny Germany victory in their Nations League tie.
Szoboszlai chipped his spot-kick down the middle of the goal after a lengthy video assistant referee (VAR) check led to on-pitch official Duje Strukan watching on a pitchside monitor to judge Robin Koch had handled Mihaly Kata’s shot.
Germany, who had already won Group A3 with a game to spare, took the lead through Felix Nmecha’s first international goal, converting a rebound from close range after Nico Schlotterbeck’s effort had been parried by Denes Dibusz.
Julian Nagelsmann made nine changes to his Germany side, who remained unbeaten in their Nations League campaign and will face either Croatia, Italy or Denmark in March’s quarter-finals.
Meanwhile, Hungary finish third in their group and will play a two-legged relegation play-off in March, needing to win to stay in the top tier of the competition.
The hosts had chances when it was goalless but efforts from Andras Schafer, Zsolt Nagy and Barnabas Varga were saved by Germany goalkeeper Alexander Nubel.
Arsenal forward Kai Havertz came on as a substitute in the 62nd minute for Germany and almost made an instant impact only for his shot to bounce off the right post when it was 0-0.
Elsewhere in Group A3, the Netherlands, already guaranteed second spot, ended the group phase with a 1-1 draw in Bosnia-Herzegovina.
The Dutch side included Brentford goalkeeper Mark Flekken, Brighton midfielder Mats Wieffer and Manchester United duo Matthijs de Ligt and Joshua Zirkzee, while Liverpool pair Ryan Gravenberch and Cody Gakpo came on as substitutes.
Brian Brobbey put the Netherlands ahead before Bosnia-Herzegovina, who suffered a Nations League record defeat when they lost 7-0 to Germany on Saturday, equalised through Ermedin Demirovic.