Despair has turned to exhilaration for Denmark as they claimed an astonishing 4-1 victory over Russia to scramble into the last 16 of the European Championship.
Needing a victory to have any chance of progression, Mikkel Damsgaard lit the touchpaper with a 38th-minute wonder goal on a head-spinning night in the Parken Stadium.
A dreadful mistake by Russia's Roman Zobnin allowed Yussuf Poulsen to double the lead on the hour.
Russia threatened a comeback when Artem Dzyuba converted a 70th-minute penalty but Andreas Christensen's super strike restored the hosts' two-goal buffer before Joakim Maehle completed the rout.
It was only half the story though as Denmark's fate was never in their own hands and they were still indebted to Belgium who beat Finland 2-0 in St Petersburg.
Having lost their opening two games in the wake of Christian Eriksen's cardiac arrest in their opener against Finland, Denmark went through as Group B runners-up and will face Wales next.
Belgium finished top of the group with a maximum nine points with Denmark, Finland and Russia all on three points but with the Danes ahead on goal difference.
Other than a Pierre-Emile Hojbjerg shot that fizzed wide early on, Denmark were struggling to make much headway against a disciplined Russia side for whom Alexander Golovin could have opened the scoring after a weaving run.
With no margin for error in their quest to stay in the tournament, there was a tension about Denmark's play and Russia had turned down the volume of the fervent home support.
But that all changed with a moment of magic from Damsgaard, Eriksen's replacement, in the 38th minute.
Receiving a pass from Hojbjerg, he took a silky touch with his left foot and opened his body to swerve a majestic shot beyond Russia keeper Matvei Safonov.
If Denmark's opener was sublime, then their second on the hour mark was ridiculous. Zobnin inexplicably played a pass back towards his keeper without looking and Poulsen completed the simplest of tasks to score.
Denmark were rampant but in the space of seconds everything went flat as Russia were awarded a penalty after Jannik Vestergaard fouled Alexander Sobolev -- and giant striker Dzyuba thumped the ball past Kasper Schmeichel to revive Russian hopes.
As news drifted through that Belgium had taken the lead against Finland, the mood turned to jubilation as Christensen and Maehle completed a sensational evening.
Australian Associated Press