Slovakia U21 1-1 Scotland U21
A late Ondrej Duda goal denied Scotland Under-21s victory in Slovakia and ended their hopes of reaching next year's European Championship.
Ryan Fraser rounded goalkeeper Dobrivoj Rusov to fire the visitors ahead midway through the second half.
However, Duda levelled in the final minute to secure at least second place in Group 3 for Slovakia.
Group leaders the Netherlands are two points ahead of Slovakia, who maintain a six-point gap over the Scots.
All three sides and Scotland's final group opponents Luxembourg have one match to play, while Georgia have completed their campaign and currently sit third, two points ahead of Billy Stark's side.
The Netherlands need only a draw from their home game with Slovakia to secure top spot and automatic qualification to next year's finals in the Czech Republic.
That game and Scotland's visit to Luxembourg take place on Monday.
Having beaten Slovakia earlier in the campaign, Stark's young Scots were hopeful of preserving their slim chance of qualification.
Rusov collected an early Lewis Macleod drive and Stevie May had a penalty claim turned down after he was challenged by Slovakia's Dionatan Teixeira.
Scots keeper Jordan Archer then had to produce a diving save to keep out a Patrik Hrosovsky free-kick.
Injury ended Clark Robertson's participation when the Aberdeen defender limped off to be replaced by Stephen Hendrie and Scotland almost fell behind through Duda's curling shot that Archer did well to save.
The officials were also forced into a change before the break as fourth official Sergii Lysenchuk replaced injured Ukrainian referee Antonlii Zhanchenko.
Branislav Ninaj could not beat Archer with a header and, after the break, Adam Zrelak and Ivan Schranz both fired wide.
Slovakia had dominated but were stunned when a swift counter attack led to Macleod putting Fraser in behind their defence.
The Bournemouth forward kept his cool as he evaded Rusov and slid the ball into the net.
Zrelak fired wide and Archer did well to block a Duda effort before Richard Lasik fired over from the rebound.
May almost extended Scotland's lead when he stung the palms of Rusov but Duda was to have the last say.
The Legia Warsaw midfielder stuck to level the match with around 30 seconds of regulation time remaining.
Slovakia U21: Rusov, Pauschek, Ninaj, Hudak, Dionatan, Rusnak (Meszaros 66), Hrosovsky, Duda, Lasik (Lobotka 83), Schranz, Zrelak. Subs Not Used: Le Giang, Robert Mazan, Mihalik, Paur, Malec.
Goals: Duda 90.
Scotland U21: Archer, Jack, McGhee, Findlay, Robertson (Hendrie 26), Slater, Macleod, McGinn, Ryan Fraser (McKenzie 82), May, Gauld (Marcus Fraser 88). Subs Not Used: Hamilton, Nicholson, Christie, McManus.
Goals: Ryan Fraser 67.
Ref: Anatolii Zhabchenko (Ukraine).