Denmark have defeated Portugal in the crucial Group H match to decide top spot and automatic qualification for next year's finals.
The Portuguese are now likely to face a play-off match if they are to progress to Poland and Ukraine unless they finish as the highest-ranked second-placed team.
Before the game both sides were on 16 points but Paulo Bento's Portugal held top spot because of a superior goal difference.
The Danes took the lead through Michael Krohn-Dehli before Sunderland striker Nicklas Bendtner doubled their advantage in the 63rd minute.
Former Charlton winger Dennis Rommedahl stole away down the right before his low cross found Bendtner for a tap-in.
Cristiano Ronaldo did pull a goal-back with a trademark long-range free kick in the 92nd minute but it was not enough for the 2004 hosts.