Substitute Niclas Fullkrug scored a late equaliser for Germany as they rescued a draw with Switzerland to top Group A.
The Swiss thought they were going through to the last 16 as group winners after an early goal from Dan Ndoye until Fullkrug headed in the equaliser.
There was an outburst of celebration from home supporters behind the goal as Germany maintained their unbeaten start to Euro 2024.
It was a blow to Switzerland, who had defended resolutely for more than 90 minutes but they still progress to the knockout stages.
Hungary snatched a 100th-minute winner to beat Scotland 1-0 and put themselves in contention for a last-16 spot at Euro 2024 while condemning the Scots to yet another failure at a major tournament in a match that also saw Barnabas Varga stretchered off following a horror collision.
Kevin Csoboth’s breakaway goal with the last kick of the match ensured Hungary finished third in Group A with three points while Scotland crashed out at the bottom of the table and are still to get through to the knockout phase of either the Euros or World Cup in their history.
Hungary must now wait to see whether they will qualify for the last 16 as one of the best third-placed finishers, depending on results from the other groups.