Inside three minutes, Scott McTominay leapt to a ludicrous height to direct the ball beyond Kasper Schmeichel with an outrageous overhead kick.
It sent a packed Hampden into cacophonous raptures, but such has been the pain this place has seen over the years, there was the overwhelming concern the lead had come too early.
The Danes, who dropped an unlikely point at home to Belarus on Saturday to set up this nail-biting showdown, repeatedly pushed for an equaliser.
Rasmus Hojlund found one from the spot after Scotland captain Andy Robertson was judged to have fouled Gustav Isaksen inside the box after an agonisingly long VAR review.
The Scots, who continued to lean on the luck which has carried them through this rollercoaster campaign, were handed another lifeline when Rasmus Kristensen was sent off for a soft second booking.
The Hampden crowd was roused, and was on its feet when substitute Lawrence Shankland stabbed home his fourth international goal with just over 10 minutes of a nerve-wracking 90 left. 'Keep the heid' territory was entered.
Instead, the fans were hushed when Patrick Dorgu too easily swept home minutes later. But this is a group, a generation, who have suffered many disappointments along the road. They were resolved tonight wouldn't be another.
Celtic full-back Kieran Tierney lashed home a spectacular long-range effort three minutes into added time to make the near-three-decade long dream in waiting a reality.
All that was required then was game-management, see it out, stuff.
But instead of heading for the corner - like his team-mates had in the agonising seconds and minutes before - Kenny McLean spotted Schmeichel off his line and exerted all his energy to find the back of the net from his own half, as Scotland ended their World Cup hoodoo in the most incredulous of fashions.