Aberdeen striker Chris Maguire was the hero as Scotland Under-21s progressed from European Championships qualifying Group 10 with a 2-1 victory over Austria at Pittodrie.
Werder Bremen forward Marko Arnautovic put Austria ahead after 10 minutes with a long-range strike but Barry Bannan equalised with a 29th-minute volley.
Austria, and Arnautovic in particular, looked more threatening but Scotland - knowing only victory would seal their passage to the play-offs - secured the win they needed when Maguire unleashed a stunning 89th-minute winner to move his team one step closer to next summer's European Championship finals in Denmark.
The visitors took the lead after 10 minutes when Arnautovic pounced on Danny Wilson's loose pass in central midfield and surged forward 10 yards before unleashing a vicious right-footed shot from 25 yards which skipped past goalkeeper Alan Martin and into the bottom corner.
Scotland had an opportunity to pull level soon after when captain Paul Caddis crossed for Maguire to turn and shoot, but goalkeeper Heinze Lindner was equal to the Aberdeen forward's effort. Dundee United's David Goodwillie, the one change made by manager Billy Stark, shot wide from 20 yards before Caddis teed up Bannan's equaliser. Caddis crossed from the right and Aston Villa midfielder Bannan, inside the left edge of the area, controlled and powered a left-footed volley across goal into the top corner.
Martin was at full stretch to stop a 35-yard free-kick from the forward six minutes later before Maguire scuffed a shot into the ground following a well-worked Scotland corner as the half ended level.
James Forrest was introduced for Wotherspoon and almost immediately cut inside from the right flank, but his tame left-footed shot was easily held. Arnautovic then had Martin beaten again, but the post saved Scotland on this occasion as the Bremen forward's curling shot hit the upright.
Lindner saved comfortably from Maguire as Scotland countered and Bannan then weaved his way into the Austria box but could not find the target with his left-footed chip.
Austria forward Atdhe Nuhiu then spurned the best chance of the game. Martin's poor kick landed at the feet of Nuhiu, who laboured forward to a one-on-one, only for the Scotland goalkeeper to make amends for his clearance.
Scotland continued to search for the winner and it came when Forrest laid the ball off for Maguire, who took a touch and fired a right-footed shot into the top corner from 20 yards.