Germany secured the tournament's only 100% record in the group stages with a 2-1 win over an organised and efficient Denmark team.
Joachim Loew's side had beaten Portugal and Netherlands, but could still have crashed out if they lost to Morten Olsen's team, with Portugal winning the night's other game go reach six points.
The Germans attacked early, with chances created by Sami Khedira and Thomas Mueller, but Denmark hit back with a Nicklas Bendtner header from a corner.
The deadlock was broken on 19 minutes when Lukas Podolski swept a low cross into the net, the goal marking his 100th cap for his country.
The lead was held for just five minutes though, as Michael Krohn-Dehli equalised for Denmark with his second goal of the tournament.
Germany were content to hold on to the ball in the second period and probed for space while Denmark intended to catch them on the break.
A long range Niki Zimling effort and a header by Nicklas Bendtner showed that the Danes were still in it, but on 80m minutes the contest swung back to Germany.
Good work by the substitute Miroslav Klose set up right back Lars Bender, in the side for the suspended Jerome Boateng, and he finished low and hard past Stephan Andersen.
For more Euro 2012 content, including a list of all our live games, match highlights, great analysis and our daily video bulletin, click through to stv.tv/euro2012.
More About Euro 2012
- Where do Sweden go after their poor performance at Euro 2012
- STV Sports Daily at the Euros: Our look back at the Euro 2012 final
- Italy manager urges Mario Balotelli to learn and grow from Euro final loss
- Vicente Del Bosque basks in 'extraordinary' Spain achievement
- Spain 4-0 Italy: Spain's dominance confirmed with rout of Italy
- Cesc Fabregas starts in strikerless Spain formation for Euro 2012 final
- Abate returns to Italy team for Euro 2012 final against Spain
- STV Sports Daily at the Euros: Our video preview of the Group B contenders
- European Championship 2012 preview: Denmark
- European Championship 2012 preview: Germany