The Danes were left needing an unlikely goal swing and other results to go their way to stand a chance of making it into the last-16 of the tournament.
They had been forced to contend with the tragedy of seeing star player Christian Eriksen suffer a cardiac arrest on the pitch during their opening game against Finland.
Though they went on to lose that game after it was controversially played on the same day, Kasper Hjulmand’s side threatened to cause a shock in their second game against Belgium.
Youseff Poulsen scored within the first two minutes, before the world’s highest ranked team scored twice in the second-half.
It meant that going into Monday night’s game against Russia, Denmark had to win and hope that Finland lost to stand a chance of going through.
Their opponents had started the night in second-place in Group B, with Hjulmand’s side bottom of the group without a point.
But backed by a boisterous crowd in Copenhagen, Denmark produced one of the best performances of the tournament so far.
Mikkel Damsgaard opened the scoring seven minutes before half-time with an exquisite curling shot.
With just over half-an-hour left in the match, Poulsen then doubled his side’s lead when he pounced upon Roman Zobnin’s poor backpass before slotting in.
Their hopes suffered a blow 11 minutes later though when Artem Dzyuba scored from the penalty spot.
But with the home crowd growing louder as news filtered through that Belgium were beating Finland, Chelsea defender Andreas Christensen scored one of the goals of the tournament.
Who will win Euro 2020? Comment below.
Russia keeper Matvey Safonov made a series of stunning saves, before the ball fell to Christensen on the edge of the box.
The defender proceeded to fire a rocket past Safonov to spark wild celebrations, with Joakim Maehle added a fourth three minutes later.
Though Belgium were leading Finland 2-0 after Lukas Hradecky’s unlucky own-goal and Romelu Lukaku’s strike, Denmark faced a nervy wait.
They gathered in a circle on the pitch, with boss Hjulmand frantically trying to refresh his phone to find out when the full-time whistle blew.
After several anxious minutes, Belgium’s win was confirmed, which meant that Denmark went through as unlikely group runners-up, setting up a last 16 tie with Wales.
After finding out the Belgium-Finland result, the Denmark team rushed over to their supporters, with Hjulmand stating they wanted to know the score before celebrating.
“The circle was because I think it’s crazy to run around and cheer without a result in the Finland game,” he said.
“We hoped it would be a magic night. I want to say thank you to all the people who have been supporting us and who have shown so much love.
“I could feel it really affected the players so thank you so much for the support, it means the world to us.”