Dominik Szoboszlai scored a stoppage-time penalty to salvage a point from Hungary's final UEFA Nations League group game against Germany.
There was little riding on the contest in Budapest, with Germany and Hungary both aware that they would finish in first and third place respectively regardless of the result on matchday six.
The first half may have been a cagey affair, but it was Hungary who had the better of the rare chances as Andras Schafer and Zsolt Nagy both forced Alexander Nubel into action.
Following an underwhelming first period, Germany started to through the gears after the restart as Robin Gosens drew a smart save from Denes Dibusz, shortly before Julian Brandt had an effort chalked off for an offside infringement.
Arsenal forward Kai Havertz then rattled the woodwork within two minutes of his arrival, before Varga reminded Germany of Hungary's threat, exchanging a one-two with Roland Sallai before he was denied by the remarkable reflexes of Nubel.
With chances starting to flow, it was only a matter of time until the deadlock was broken, with Felix Nmecha guiding the ball home from close range after Dibusz had kept Schlotterbeck's header out following a corner.
Julian Nagelsmann's appeared to be on course for all three points, but just as Germany started to turn their attention to the flight home, the game produced one final moment of drama when Robin Koch was penalised for a handball.
Szoboszlai was the man chosen to take the final kick of the game, and he rose to the challenge, producing an audacious Panenka to restore parity from the penalty spot, ensuring the two sides shared the spoils on the final matchday of the Nations League group stage.
Germany finished with a record of four wins and two draws, while third-place Hungary ended the group phase with one, three draws and two defeats.
HUNGARY VS. GERMANY HIGHLIGHTS
Brandt's disallowed goal vs. Hungary (60th min, Hungary 0-0 Germany)
For a brief moment, Germany think they have finally broken the deadlock. Brandt latches onto Leroy Sane's through ball, before firing the ball into the roof of the net. However, Brandt's celebrations are quickly cut short by the assistant's raised flag. The subsequent replays confirm Brandt had just strayed offside.
Nmecha goal vs. Hungary (76th min, Hungary 0-1 Germany)
This one will not be ruled out. Schlotterbeck meets Florian Wirtz's deep corner, forcing Dibusz into a desperate save on his line. Unfortunately for the Hungary goalkeeper, Nmecha was on hand to turn home the rebound to score his first international goal.
Szoboszlai goal vs. Hungary (99th min, Hungary 1-1 Germany)
Late drama in Budapest! The referee is told to go to the monitor after commuting with his VAR officials. The final decision is a penalty after replays show Koch handled the ball from Mihaly Kata's driven strike. Szoboszlai shoulders the pressure to produce a sublime Panenka to score a dramatic equaliser.
MAN OF THE MATCH - DOMINIK SZOBOSZLAI
Dominik Szoboszlai arguably deserves the Man of the Match award purely for the confidence he showed to produce a Panenka penalty with the last kick of the game.
The Liverpool man also offered a constant threat throughout the contest, demonstrated by the fact he created seven chances for his country.
HUNGARY VS. GERMANY MATCH STATS
Possession: Hungary 29%-71% Germany
Shots: Hungary 16-12 Germany
Shots on target: Hungary 6-3 Germany
Corners: Hungary 7-5 Germany
Fouls: Hungary 17-12 Germany
BEST STATS
WHAT NEXT?
After wrapping up the group stage, Germany will now turn their focus to the quarter-final draw on Friday when they will find out whether they will face Croatia, Italy or Denmark.
Hungary will also have an eye on the upcoming draw, with Rossi's side set to face one of the four teams that finished in second place in League B.