Germany extended their 100% record at Euro 2025 to qualify for the quarter-finals with a comeback win over Denmark in Basel that was tinged with controversy.
Their place in the knockout stages was confirmed alongside Sweden, who beat Poland 3-0 later on Tuesday - a result that also put the Poles and Danes out of the competition.
Eight-time champions Germany had two video assistant referee (VAR) decisions ruled against them in the first half, with a Klara Buhl goal disallowed and a penalty claim overturned.
Buhl found the bottom corner with a first-time drive, but the effort was ruled offside as Sjoeke Nusken touched the ball as it flew into the net.
It was Denmark instead who claimed a surprise opener in the 26th minute against the run of play when Amalie Vangsgaard's powerful strike from a loose ball beat Ann-Katrin Berger at her near post.
Germany had the chance to level from the penalty spot when Frederikke Thogersen handled a cross in the area, but VAR overturned the decision after spotting the Danish defender was outside the box for the infringement.
Frustrated by their first-half display, the Germans returned with the bit between their teeth and got the equaliser they craved through a Nusken penalty in the 56th minute - awarded by VAR after Katrine Veje was deemed to have clipped Linda Dallmann in the area.
Christian Wuck's side built momentum and piled the pressure on Denmark, who conceded again 10 minutes later when Lea Schuller found space in the box before unleashing an effort into the bottom corner.
But that followed a head injury to Denmark's Emma Snerle, who was caught by a clearance straight into her face from team-mate Emma Faerge. Referee Catarina Campos did not stop play, despite Snerle being on the ground and clearly needing treatment, and Germany collected the loose ball with Jule Brand setting up Schuller to score the winner.
Midfielder Snerle was in a dazed and distressed state as she was helped off the pitch and replaced by Josefine Hasbo before the game restarted.
Denmark boss Andree Jeglertz, who will be taking charge of Manchester City after the Euros, was critical of Portuguese official Campos for allowing play to continue for Germany to snatch the decisive second goal.
"We need to make the rules clear," he said afterwards. "If you get a player that has a serious head injury, my view is you need to blow the whistle, you need to take responsibility as the referee. I don't understand why she doesn't stop the game."
Despite a late push, Denmark were unable to find a way back and have failed to qualify for a second successive Euros. Germany are second in Group C on six points with Sweden, who are top on goal difference.