Denmark will face Wales in the Euro 2020 last 16 after clinching second place in Group B with a superb 4-1 victory over Russia in Copenhagen.
The Danes took the lead in the 38th minute through a stunning Mikkel Damsgaard strike and Yussuf Poulsen doubled the advantage just before the hour mark as he punished a mistake by Roman Zobnin.
Russia replied with Artem Dzyuba's 70th-minute penalty before strikes from Andreas Christensen in the 79th minute and Joakim Maehle three minutes later wrapped up victory in front of a delirious crowd at the Parken Stadium.
The result, combined with Belgium's 2-0 win over Finland, sees Kasper Hjulmand's Denmark through to take on Wales in Amsterdam on Saturday as Group B runners-up, while Stanislav Cherchesov's Russia, having started the match lying second in the pool, are out having ended up bottom.
It has been a remarkable turnaround for Denmark in their emotional campaign at the tournament, having lost their first two matches, at the same venue, after the shock of midfielder Christian Eriksen's cardiac arrest in the opener against Finland.
Russia provided the first real attempt on goal in the 18th minute when Aleksandr Golovin burst into the box and struck a shot that Kasper Schmeichel blocked with his legs.
Dzyuba fired well wide of Schmeichel's goal moments later, before Pierre-Emile Hojbjerg threatened for the hosts as he sent a firm strike off-target.
After Golovin blazed a subsequent attempt into the stand, Denmark then took the lead in spectacular style as Damsgaard received the ball from Hojbjerg and sent a dipping shot in from around 25 yards out.
The Danes went close to adding a second in first-half stoppage time when Jannik Vestergaard headed wide.
The lead then was extended when Zobnin's misjudged attempt at a pass back was pounced upon by Poulsen, who slotted in with ease.
Russia reduced the deficit when Aleksandr Sobolev was fouled by Vestergaard and the resulting spot-kick was struck past Schmeichel by Dzyuba.
But Denmark were soon back on the front foot, and after Matvei Safonov made three saves in quick succession to deny Christensen, Martin Braithwaite and Simon Kjaer, the ball came to Christensen, who cracked it home for 3-1.
Maehle then swiftly added the fourth with a strike from the edge of the box, and made the number 10 – which Eriksen wears on his shirt – with his fingers as he celebrated amid the roar of the Danish fans.