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.
“At the end I think this point is well deserved. We risked a lot, as we could have conceded a second goal,” said Germany boss Julian Nagelsmann.
“It was a very strong group and a very good match. I think if we had scored that first goal, it would have been very difficult for Switzerland.”
Murat Yakin’s Swiss side knew victory would see them leapfrog Germany and they almost delivered in Frankfurt until pressure took its toll in stoppage time.
Germany, who had largely frustrated the home fans in the stands, created a flurry of chances late on and eventually did enough.
Earlier, Swiss fans were bouncing and singing in the stands after Ndoye had placed a first-time shot into the roof of the net from Remo Freuler’s dangerous cross.
‘Excellent’ Ndoye goal gives Switzerland lead over Germany
Ndoye also had a goal ruled out for offside in the second half that would have made it 2-0 – the second to be crossed off after the video assistant referee (VAR) intervened for Germany’s Robert Andrich.
Andrich curled a shot from the edge of the box under the arms of goalkeeper Yann Sommer, whose blushes were saved when referee Daniele Orsato overturned his decision after going to the pitchside monitor to see a foul from Jamal Musiala in the build-up.
Germany had lacked the ruthlessness they had shown in their opening two victories of the tournament but high hopes remain that they can go all the way in the competition.