David Marshall was the hero as Scotland reached the Euro 2020 finals with a penalty shoot-out win over Serbia in Belgrade.
Scotland, of course, did it the hard way as they reached their first major tournament since 1998 after a 1-1 draw.
Ryan Christie’s strike appeared to have sent Steve Clarke’s dominant side into Euro 2020 but Serbia scored with their first effort on target in the 90th minute.
However, the blow proved to be fleeting as Marshall saved from Aleksandar Mitrovic in the 10th penalty of the shoot-out.
Christie gave Scotland a deserved 52nd-minute lead with an excellent strike from outside the box and Steve Clarke’s side had chances to give themselves an extra cushion.
They would regret not getting a second goal, despite looking comfortable for the vast majority of normal time.
Marshall was rarely troubled, the Scotland defence were resolute when they needed to be, the midfield composed and confident and Christie, John McGinn and Lyndon Dykes gave the home defence serious problems.
But Serbia put Scotland under some late aerial pressure and Luka Jovic headed home unchallenged following a corner 20 seconds before the 90-minute mark.
However, Scotland secured a 5-4 penalties triumph to set themselves up for two Hampden encounters against Croatia and Czech Republic and a Wembley clash with England at next summer’s delayed finals.
The signs were good coming into the clash in Red Star’s Rajko Mitic Stadium.
Scotland were eight matches unbeaten and had recorded four wins and three clean sheets on the trot.
Clarke went with the bulk of the team that had won three matches in October but Kieran Tierney and Christie returned, the latter for the injured Ryan Fraser, after the pair were instructed to self-isolate last month.
There was more encouragement from the early stages as Scotland dominated possession and territory in the opening 10 minutes, getting several crosses into the box without finding a blue shirt, before Christie drew a save from an ambitious free-kick.
Serbia were barely seen as an attacking force until coming close midway through the half. Aleksandar Mitrovic laid the ball back for Sasa Lukic who steered the ball a yard wide from the edge of the box.
Scotland came closer when Christie fed McGinn after a long ball, the latter’s shot gathered at the second attempt.
Scotland continued to threaten and skipper Andy Robertson spurned a glorious chance five minutes after the break after Lyndon Dykes had seen off three defenders to roll the ball into his path. The Liverpool player sliced his shot well over.
The Scots were ahead 90 seconds later. Callum McGregor intercepted and fed his Celtic team-mate, Christie, who swivelled and fired the ball in off the post from 22 yards.
Christie soon had a volley saved following a Dykes head-on and Scotland remained in control.
Serbia had to step up a gear and did so in the final 20 minutes. Headers from Sergej Milinkovic-Savic and Mitrovic were not far wide but Scotland were still creating chances.
McGregor saw a long-range effort swerve just wide and Christie came close after running on to a long ball.
The home pressure increased and Jovic headed wide from a good chance but Scotland looked to be riding it out until the substitute evaded marker Scott McTominay amid a crowd of bodies to head home unchallenged from Filip Mladenovic’s corner.
Clarke had taken off his most advanced three players in the final seven minutes of normal time with Oli McBurnie, Callum Paterson and Kenny McLean now finding themselves leading the charge after being brought on to help shore up a lead.
Stephen O’Donnell and Ryan Jack came close from long range in the opening moments but Scotland were soon under pressure again and Marshall produced a brilliant fingertips save to divert Nemanja Gudelj’s long-range effort away from the top corner.
Scotland had lost their attacking rhythm and Clarke threw on Leigh Griffiths in the 117th minute for his first cap in more than two years.
Griffiths’ first involvement was to fire home the opening penalty of the shoot-out. McGregor, McTominay, McBurnie and McLean also netted before Marshall denied Mitrovic.
Meanwhile Northern Ireland’s Euro 2020 qualifying campaign ended in heartache as Michal Duris’ extra-time goal condemned them to a 2-1 play-off final defeat at home to Slovakia.
A dramatic own goal from Milan Skriniar in the 88th minute cancelled out Juraj Kucka’s first-half opener and sent the game into an extra half an hour.
The momentum seemed to be with the hosts but it all changed in the 110th minute when a hopeful through-ball bounced off Jonny Evans and fell kindly for Duris to beat Bailey Peacock-Farrell at his near post.
The Burnley goalkeeper will feel he could have done better, but it was a bitter blow for Northern Ireland as their hopes of qualifying for a second consecutive European Championship were quashed.
Ian Baraclough’s men began the night in the unusual position of favourites against a side who sacked their manager last month, but they could not capitalise as Slovakia made the most of the chances they were gifted.
Northern Ireland, so often guilty of making a slow start in recent times, looked determined to put that right as they raced out of the blocks to peg Slovakia back in the early going, roared on by the 1,060 fans allowed into Windsor Park.
But finding a final ball proved elusive, and Slovakia had already threatened through ex-Manchester City man Albert Rusnak before they took the lead against the run of play.
George Saville tried to chest the ball back to Evans from the halfway line but noticed too late that the Leicester defender had stepped up, allowing Kucka the freedom to race through and fire beyond Peacock-Farrell.
Northern Ireland responded well to the setback, however.
Niall McGinn, restored to the starting eleven for the first time since scoring in the play-off semi-final against Bosnia and Herzegovina last month, almost caught out Fulham goalkeeper Marek Rodak with a cross that drifted towards the far post, before Stuart Dallas dragged a shot wide.
McGinn’s cross narrowly eluded Josh Magennis before the Aberdeen winger fired over from a loose pass by Stanislav Lobotka, and Northern Ireland trailed at the break.
They were straight back on the front foot in the second half, using a high press to keep the visitors under pressure around their own box, with Conor Washington testing Rodak after McGinn won the ball.
But the occasion was perhaps getting to Northern Ireland as they began to rush passes, allowing Slovakia to assert increasing control.
Gavin Whyte and Jordan Thompson replaced Washington and Saville, but it was the decision to send on Kyle Lafferty and Liam Boyce in place of McGinn and Magennis that altered the dynamic.
The leveller came with two minutes left. Paddy McNair raced into the box from the right, looking to feed substitute Boyce, but it was Skriniar who turned the ball into his own net.
Lafferty then fired against the post as Northern Ireland sought an unlikely winner before the 90 minutes were up, but instead the game went into extra time.
Their efforts began to take a toll. Craig Cathcart went off holding his groin in the 97th minute, while McNair followed soon after, suffering from cramp.
The energy faded from Northern Ireland as they went, and the hammer blow came 10 minutes from time as Duris struck.
Inevitably there was a late chance to level, with Thompson’s cross picking out Evans six yards from goal, but the exhausted defender could not find the power needed to beat Rodak.