Denmark U21s dumped out by Iceland
In the other game in Group A, Admir Mehmedi netted twice as Switzerland beat Belarus 3-0 although both teams still went through to the semi-finals.
The Danes had plenty of chances in the first half, with Ajax Amsterdam's talented teenager Christian Eriksen and Nicki Bille Nielsen going close.
Iceland, though, went ahead through Kolbeinn Sigthorsson in the 58th minute before Birkir Bjarnason made it 2-0 with a towering header.
Denmark pulled one back with a header from Bashkim Kadrii only for Hjortur Valgardsson to clinch victory for Iceland in stoppage-time.
Group B will be decided on Sunday when England meet Czech Republic and Ukraine play leaders Spain.