Gian-Luca Waldschmidt scored a superb solo goal as Germany clinched their place in the European Under-21 Championship semi-finals despite being held to a 1-1 draw by Austria, who crashed out of the competition.
Freiburg forward Waldschmidt skilfully turned his marker before side-footing the ball powerfully into the far corner of the net from the edge of the box to give Stefan Kuntz's men the lead after 14 minutes of a tense Group B clash at Stadio Friuli in Udine.
The strike was Waldschmidt's fifth of the tournament but holders Germany were soon pegged back when goalkeeper Alexander Nubel fouled Sasa Kalajdzic in the box and Kevin Danso expertly rolled the ensuing spot-kick to Nubel's right to level the score at 1-1.
Austria came out brightly in the second half but Germany's defence held firm to ensure they clinched top spot in the group, one point clear of Denmark who crashed out despite beating Serbia 2-0.
Niels Frederiksen's Denmark were out on their feet in Trieste after goals from Jacob Bruun Larsen and Jacob Rasmussen were enough to see off Serbia but not to keep them from exiting the competition.
Bruun Larsen gave Denmark the lead after 21 minutes, guiding a cool finish beyond Dragan Rosic from a tight angle, and Rasmussen doubled their advantage with a simple close-range finish after Serbia failed to clear a corner six minutes into the second half.
But Italy, who finished second in Group A, ended the group stage with a superior goal difference that ensures Denmark will play no further part in this year's tournament.