Scotland have won their second game of the Euro qualifiers against Liechtenstein in their second Euro qualifier, but very nearly faced a shameful defeat.
James McFadden provided the first real chance of the night for Scotland with a free kick to Lee McCulloch, who smashed the ball over the Liechtenstein crossbar.
Darren Fletcher also put in a lot of effort for his country but was also denied even the whiff of a goal.
Scotland continued to hold most of the possession but were unable to make chance against one of Europe's tiniest nations, much to the annoyance of the Tartan Army.
At half time the score was 0-0.
In the second half Liechtenstein shocked the Scots when David Hasler crossed to Mario Frick who took the visitors 1-0 up.
Liechtenstein held their lead for 15 minutes and looked like they might write one of the most embarrassing chapters in Scottish footballing history.
An uphill struggle for Scotland seemed to get worse when Lee Wallace was taken off the field with an injury after being tackled by Martin Stocklasa. The resulting free kick gave Scotland a chance to equalise, however the chance was squandered by Darren Fletcher.
Fletcher tried to make up for it soon after with an excellent shot on goal, only to be denied by an equally excellent save from Peter Jehle.
Kenny Miller finally came to Scotland's rescue after Liechtenstein failed to clear a cross from Barry Robson. Miller took the opportunity and brought the scoreline to 1-1, still embarrassing but not as bad as a loss.
Liechtenstein, still with one of their best results ever on the cards, tried every trick in the book to hold on to a draw, with time wasting galore and a ten man defence.
In the frantic attempt to score the winner Lee McCulloch got a yellow card, meaning he will miss the next game for Scotland.
Scotland were given a new lease of life when the referee declared there would be five minutes added time. Five minutes passed and no goal came, but also no final whistle. Six minutes, no goal and no whistle.
Then in the 97th minute Stephen McManus headed in a corner from Barry Robson to score the winning goal just before the final whistle.
Scotland finish 2-1 and top their group after Lithuania pulled off a shock victory against previous leaders Czech Republic.