Hosts Germany came back from a goal down to snatch a 1-1 draw with Switzerland thanks to a stoppage-time goal from Niclas Fuellkrug that sends them into the knockout stage of Euro 2024 as winners of Group A, with the Swiss finishing in second place.
Germany's Robert Andrich had a 17th-minute goal ruled out for a foul in the build-up, and 11 minutes later Dan Ndoye scored with a deft volleyed finish for the Swiss before striking the foot of the post two minutes later.
Germany exerted enormous pressure in the second half but they struggled to get shots on target, and substitute Fuellkrug had to bale them out with a late header to grab a share of the spoils and secure the group victory.
Germany will now face the second-placed team in Group C, with England, Denmark, Slovenia or Serbia all still in the mix, in Dortmund on June 29, while Switzerland will play the second-placed team in Group B on the same day in Berlin, with Italy, Albania and Croatia their potential opponents.
Hungary snatched a 100th-minute winner to beat Scotland 1-0 and put themselves in contention for a last-16 spot at the European Championship while condemning the Scots to yet another failure at a major tournament.
Kevin Csoboth's breakaway goal with the last kick off the match ensured Hungary finished third in Group A with three points while Scotland crashed out bottom with two, still to get through to the knockout phase of either the Euros or World Cup.
Hungary must wait to see whether they will qualify for the last 16 in one of the places reserved for the best four third-placed finishers.
Their progress now rests on results from other groups going their way over the next three days.