Scotland qualified for a first major international tournament in 22 years thanks to a 5-4 win on penalties over Serbia after a 1-1 draw in Belgrade to reach Euro 2020.
The Scots’ demons of two decades without qualifying seemed set to reappear when Luka Jovic’s 90th-minute header sent the game into extra time.
Ryan Christie’s opener had deservedly put the visitors in front during what had been a fine performance from Steve Clarke’s men.
But just like in a semi-final shootout win over Israel, Scotland kept their cool with five perfect penalties and finally got over the line when David Marshall saved from Aleksandar Mitrovic.
The reward is a place alongside Croatia, Czech Republic and England in Group D with matches against the Czech and Croats on home soil at Hampden.
Scotland are now unbeaten in nine games stretching back 13 months and the confidence Clarke has instilled in his side showed as the visitors controlled the first 90 minutes.
The physical presence of Lyndon Dykes up front for Scotland caused the Serbian defence all sorts of problems and the Australian-born striker’s flick-on created the best chance before the break when John McGinn’s shot lacked the power to beat Predrag Rajkovic.
However, Scotland came out firing at the start of the second half.
Andy Robertson should have opened the scoring when the Liverpool left-back blazed over with just Rajkovic to beat after brilliant work from Dykes to tee up his captain.
Christie missed the play-off semi-final win over Israel and victories over Slovakia and the Czech Republic in the Nations League last month after he was categorised as a close contact of Stuart Armstrong, who tested positive for coronavirus after joining up with the Scotland squad.
Christie’s moment of quality
Had it not been for an injury to Ryan Fraser, it is unlikely the Celtic midfielder would have started, but Christie produced the moment of quality his nation was crying out for on 52 minutes.
Christie collected Callum McGregor’s pass on the edge of the box then fired low, in off the post, on his favoured left foot.
Scotland continued to have the upper hand as McGregor and then Christie fired powerful shots inches wide.
In between times, Serbia nearly responded when Sergej Milinkovic-Savic rose at the back post but powered his header into the side-netting.
The Lazio midfielder, who scored twice in Serbia’s 2-1 playoff semi-final win over Norway last month, was then surprisingly sacrificed with Real Madrid striker Jovic thrown on by Ljubisa Tumbakovic to find an equaliser.
Jovic has struggled to make an impact in Spain since a 60 million euro ($71 million) move from Eintracht Frankfurt, but broke Tartan Army hearts as the game entered stoppage time.
Scotland had not conceded a goal in over 470 minutes but incredibly left Jovic all alone in the heart of the area to head home a corner.
Serbia had all the momentum going into extra time with Clarke having withdrawn Dykes, Christie and McGinn towards the closing stages of normal time.
Marshall had to produce a brilliant save from Nemanja Gudelj a winner.
And the Derby goalkeeper was the hero in the shootout after Leigh Griffiths, McGregor, Scott McTominay, Oli McBurnie and Kenny McLean had found the net.