Scotland's under-21s were delighted with the late goal at Pittodrie
Chris Maguire's late goal at Pittodrie against their Austrian counterparts sent Scotland Under-21s into the European Championship play-offs.
Those two sides and Belarus started the day equal on points at the top of Group 10, but the Scots qualify as winners after their victory in Aberdeen.
Marko Arnautovic long-range strike gave the visitors the lead after 10 minutes.
But Barry Bannan volleyed in 19 minutes later and Maguire's long-range drive with a minute left secured the win.
It meant that, although Belarus defeated Azerbaijan 1-0, the Scots head the group with a better head-to-head than the Eastern Europeans.
Can't believe goal myself - Macguire
Romania, Italy, Czech Republic and Sweden join the Scots as group winners in Friday's under-21 play-off draw after Tuesday's results, while Spain, England, Belarus and Iceland are the best runners-up.
Switzerland, the Netherlands, Croatia, Ukraine and Greece had already secured their spots in next month's two-legged ties.
However, it did not look good for the Scots, who had lost 1-0 in Austria 12 months ago, when they went behind early on shortly after home defender David Wotherspoon shot narrowly wide.
Alexander Grunwald had already been denied by Alan Martin before the Leeds goalkeeper was picking the ball out of his net.
Werder Bremen striker 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 that skipped past Martin and into the bottom corner.
Arnautovic (left) had given the Austrians the lead
Austria goalkeeper Heinze Lindner was equal to a Maguire shot on the turn, while Wilson headed wide from the resulting corner.
Austria's Fabian Koch and Scotland's David Goodwillie, the one change made by coach Billy Stark, both fired wide from long range before the 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.
However, Martin was at full stretch to stop a 35-yard free-kick from Arnautovic six minutes later, while Lindner saved from Paul Coutts.
Arnautovic had Martin beaten, but the post saved Scotland on this occasion as the Bremen forward's curling shot hit the upright.
Scotland were applying the greater pressure, but the Austrians were creating the better chances on the break and forward Atdhe Nuhiu 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 James Forrest laid the ball off for Maguire and the Aberdeen forward took a touch and fired a right-footed shot into the top corner of his home net from 20 yards.
Scotland Under-21 manager Billy Stark: "We could've ended up not getting the required result, but it wouldn't have changed the performance or what we think about them.
"They've been absolutely tremendous start to finish.
"We want to be respected for playing good football and creating chances.
"The bonus is we've got the resilience, the hunger and the desire which you can't put into people - they have to have that. We've showed that throughout."
Bookmark with:
What are these?