COPENHAGEN: On their way out of the tournament and having lost Christian Eriksen to a cardiac arrest, Denmark tore up the script to secure a spot in the Euro 2020 knockout stages in a fairytale ending that Hans Christian Andersen could barely have imagined.
The Danes had taken the 2-0 lead they needed against Russia to go second in Group B if Belgium beat Finland, but Artyem Dzyuba's 70th-minute penalty sent them down to third again, their tournament hopes ebbing away.
It was a similar story in their second group game against the Belgians, when they took an early lead, only to capitulate to the brilliance of Kevin De Bruyne.
On Monday, though, they would not be denied.
Led by captain Simon Kjaer, who engaged in a titanic struggle with the gigantic Dzyuba all night, the Danes dug deep into a well of courage that has sustained them since Eriksen's collapse, and they were not to be found wanting.
Defender Andreas Christensen ventured further forward, eventually picking up a ricochet well outside the box and unleashing a pile-driver that flew into the back of the net in the 79th minute.
The beer from plastic cups thrown high into the night sky in celebration rained down as a thunderous roar of jubilation echoed around a stadium that had been silenced by Eriksen's collapse nine days ago.
In the aftermath of that incident, the Danes struggled to find their rhythm in the 1-0 loss to Finland and they did not recover it fully in time for the Belgium game.
Their shooting was wayward and lacking conviction, but against Russia everything went their way.
The final word fell to Joakim Maehle, who had taken the throw-in to Eriksen just before he slumped to the turf.
The right-footed left back with a penchant for attacking raids roared forward before firing home the fourth goal to send the Copenhagen crowd into ecstasy.
As he ran to celebrate, Maehle formed his fingers into the number 10 worn by Eriksen, who is now recovering at home following his discharge from hospital, just as Christensen had done before him.
The final whistle went to confirm a 4-1 win, but the final chapter was not yet written. Finland were two goals down yo Belgium but still playing, and the Danish players and staff formed a ring in the middle of the pitch.
This time, however, it wasn't to protect a stricken team mate.
An official from the Danish FA refreshed an app on his phone but the crowd were quicker, their roar informing the stadium that Belgium had won and that Denmark, after losing both their playmaker and their first two games, were through to the knockout stages.
The players whooped, danced and jumped in the air, hugging and pumping their fists. As the lap of honour stretched out long after the final whistle, strikers Andreas Cornelius and Yussuf Poulsen threw their shirts into the crowd.
When Eriksen collapsed against Finland, fans could not watch. Now, they could not bring themselves to leave as they expressed their gratitude to coach Kasper Hjulmand and his courageous squad.