Germany pipped Switzerland to first spot in Group A courtesy of a stoppage-time header from Niclas Fullkrug in Sunday night's Euro 2024 clash in Frankfurt.
Dan Ndoye sent Switzerland ahead in the 28th minute, and the goal looked to be enough to see A-Team move onto seven points in the section, which would have secured first ahead of Germany.
However, Fullkrug came up with a 92nd-minute leveller for the tournament hosts, and the point has seen Julian Nagelsmann finish at the head of Group A.
As section winners, Germany will take on the runner-up in Group C in the last-16 stage of the competition, which is currently Denmark but could yet be England.
Switzerland, meanwhile, will take on the runner-up in Group B, which is currently the holders Italy.
The hosts won their opening two games at the tournament with ease, but they were second-best for long spells on Sunday against a well-drilled Switzerland outfit that not too many teams will relish taking on.
Switzerland denied by last-gasp Germany leveller
Despite already qualifying for the next round, Germany head coach Nagelsmann named an unchanged side for the third game in a row at the competition, with Kai Havertz again leading their line.
As for Switzerland, there was a start for Breel Embolo in the final third of the field, and it proved to be the first time that he had been named in a Swiss XI since the 2022 World Cup, while Fabian Rieder was also introduced following the 1-1 draw with Scotland last time out.
Germany have disappointed in their last three major tournaments, being eliminated in the group stages of both the 2018 and 2022 World Cups, while they only made the round of 16 at Euro 2020.
The breakthrough appeared to have come in the 17th minute of the contest, with Robert Andrich's effort from distance somehow finding a route past Switzerland goalkeeper Yann Sommer.
However, following a VAR check for a foul, the goal was disallowed, with Jamal Musiala diving into Michel Aebischer, and Sommer would have been incredibly relieved, as the ball should not have beaten him.
Germany were getting joy down the left, and it was again Musiala pulling the strings, with the Bayern Munich attacker proving to be one of the best players at the tournament thus far.
However, Switzerland opened the scoring in the 28th minute, with Ndoye expertly turning into the back of the net from close range after getting on the end of a delivery from Remo Freuler.
At that stage, Switzerland were winning the group, and Ndoye came close to a second less than two minutes after his first, but the forward's effort across the goal was just wide of the far post.
Jonathan Tah has been ruled out of Germany's last-16 contest due to the booking that he picked up in the 38th minute, and his rash challenge was a sign of the home nation's frustration.
Musiala scooped one over the crossbar late in the first period, before Andrich missed the target from distance, with Switzerland entering the half-time interval one goal ahead.
Euro 2024 hosts Germany could face England in round of 16
Germany had two chances in quick succession early in the second half, but Sommer denied Musiala, before Ilkay Gundogan turned the rebound wide of the post.
Toni Kroos then struck wide in the 55th minute, before David Raum fired one from distance eight minutes later, with Switzerland coming under pressure, but Murat Yakin's side remained a threat down the other end of the field
Havertz headed over the Switzerland crossbar in the 68th minute, before Joshua Kimmich had one blocked by the brilliant Manuel Akanji, with Germany coming close to a leveller.
Switzerland thought that they had scored a second in the 84th minute through Ruben Vargas, but the substitute's clever finish into the bottom corner was disallowed due to an offside.
Havertz then hit the crossbar with a header down the other end, before Manuel Neuer did brilliantly to keep out a curling Granit Xhaka effort.
Germany did manage to score the all-important leveller in stoppage time, though, with Fullkrug heading a delivery from Raum into the back of the net to secure first spot in Group A.
Man of the Match
Akanji was the star of the show in this match, with the Manchester City centre-back putting in a brilliant performance in the middle of the Switzerland defence.
The 28-year-old finished with a pass success rate of 90%, according to WhoScored, while he was aerially dominant and made an outstanding block in the second period to prevent Kimmich from finding the back of the net.
It was a real team performance from Switzerland, but they had some outstanding performers, and Akanji was firmly at the top of that list. body check tags ::