Germany survived a scare to finish top of Group A at Euro 2024 as Niclas Fuellkrug's stoppage-time goal rescued a 1-1 draw against Switzerland, while Hungary striker Barnabas Varga suffered a sickening injury in the 1-0 win that eliminated Scotland on Sunday.
Dan Ndoye's first-half goal in Frankfurt had put Switzerland on course to climb above hosts Germany into top spot.
But Fuellkrug's late header ensured Julian Nagelsmann's side advanced to the last 16 in pole position with seven points.
"In the end it's a well-deserved point. We did well to come back. We deserved it," Nagelsmann said.
"Niclas is important for us. It's important to have players who can score decisive goals coming on as substitutes."
The Germans, who last won the Euros in 1996, will take on the Group C runners-up -- currently slated to be Denmark -- in the last 16.
Denmark, two points behind leaders England, play Serbia in their last group game on Tuesday.
Germany are also on track for a potential quarter-final clash with Spain, who have been among the best teams at the tournament so far.
Switzerland have now made the knockout stage in six successive major tournaments.
As Group A runners-up with five points, the Swiss will face the second-placed team in Group B in the last 16.
"We fought, but against such an opponent it's difficult. We did a great job. It was a huge challenge," said Switzerland coach Murat Yakin.
Already through to the last 16 after beating Scotland and Hungary, Germany fell behind in the 28th minute.
Ndoye met Remo Freuler's cross with a close-range volley that flashed past Germany goalkeeper Manuel Neuer.
Ndoye's first international goal was made in Bologna as both he and Freuler played for the Serie A club last season.
Adding to Germany's problems, Jonathan Tah was booked, earning the centre-back a ban for the first knockout game.
Germany dominated possession but Ilkay Gundogan scuffed wide with the goal at his mercy after Yann Sommer parried Jamal Musiala's stinging strike into the midfielder's path.
Their pressure was finally rewarded in stoppage-time when Fuellkrug rose highest to power his header into the top corner.
- Scotland misery -
In Stuttgart, Scotland were unable to secure the victory that would likely have taken them into the knockout stage of a major tournament for the first time.
In 11 previous appearances at major competitions -- eight World Cups and three European Championships -- Scotland had bowed out at the group stage.
Once again, they will fly home early after taking just one point from their three matches.
Steve Clarke's team, who lost to Germany and drew with Switzerland in their first two games, were sunk by a goal 10 minutes into stoppage-time from Kevin Csoboth.
Bemoaning a rejected penalty appeal for a challenge on Stuart Armstrong, Clarke said: "I don't understand how VAR can look at that and say it's not a penalty.
"The over-riding feeling is to be sad for everybody that we are out."
Hungary may not secure a last 16 berth despite their victory as they have only three points from their three games.
The four third-placed teams with the best records from the six groups will move into the last 16.
Hungary's win came at a cost as Varga was stretchered off after a sickening collision.
Varga collapsed to the pitch and was struggling to move after chasing a long cross into the area as Scotland goalkeeper Angus Gunn came to collect the ball.
After a long delay, medics took the 29-year-old from the pitch while a sheet was draped around the stretcher.
Hungary captain Dominik Szoboszlai appeared to be in tears as he consoled his stricken teammate.
Varga was immediately taken to hospital after the incident where he was said to be conscious and talking.
"The condition of Barnabas Varga is stable," the Hungarian Football Federation (MLSZ) wrote on X.
"The Hungarian national team player is currently in one of the hospitals in Stuttgart. We will inform you immediately if there is any news on his status."
In Group B on Monday, Italy take on Croatia, while Spain, already qualified in first place, face Albania.
Italy are second in the group with three points, while Croatia and Albania both have one point.