Match ends, Scotland 2, Poland 2.
Scotland's hopes of reaching Euro 2016 ended as Poland equalised with the final kick of the match at Hampden.
Robert Lewandowski scrambled the ball over the line as the hosts failed to clear a stoppage-time free-kick.
It had appeared Scotland's faint hopes of qualification were still alive as superb goals by Matt Ritchie and Steven Fletcher put them in front.
But Lewandowski, who had silenced the home crowd with an early opener, repeated that feat in the last seconds.
What it means
A point would only have been good enough for Scotland had the Republic of Ireland lost at home to Germany.
But Martin O'Neill's side beat the world champions 1-0 in Dublin to consign Gordon Strachan's men to fourth place in Group D.
It means the match against bottom side Gibraltar in Portugal on Sunday is a dead rubber.
Man of the match - lethal Lewandowski
Scotland defended stoutly for much of the game but lapses at the outset and the end allowed the deadly Lewandowski to punish them.
With 12 goals in his last four club games and 10 already to his credit in this qualifying campaign, the Bayern Munich striker needed just over two minutes to add to that tally, beating David Marshall at his near post after peeling off the shoulder of Russell Martin.
He kept Martin and Grant Hanley occupied throughout, though the defensive pair largely kept him quiet.
That was until the final act of the match as Kamil Grosicki's deflected free-kick rebounded off the post for Lewandowski to smuggle it into the net.
It was a cruel, if rather typical, end to the game for Scotland, who had done themselves great credit in coming from behind to lead.
Bournemouth winger Ritchie's ferocious drive just before half-time gave them an impetus largely lacking in the first half.
And Fletcher's beautifully taken curling finish looked like being enough to win - until Lewandowski's late intervention.
After Sunday's meaningless game in Gibraltar, Strachan will have to decide whether he sees a future for himself as the national manager.
The Scottish Football Association has already stated its desire to keep him in the post.
Although there have been some poor performances and results in recent months, the consensus is that Scotland are improving under the 58-year-old.
When asked about his future after the game, he said: "The players are the priority at the moment. To talk about me is all wrong. I will leave that to other people.
"I have people in this building hurting and I need to look after them."
The stats you need to know
- Robert Lewandowski has scored more goals in Euro 2016 qualifying than 29 of the participating countries
- Scotland have never beaten Poland in Glasgow
- The Scots have only won one competitive game in 2015 - against Sunday's opponents Gibraltar in March
|How the night unfolded|
|19:49 BST: Robert Lewandowski puts Poland ahead in Glasgow, before the Republic of Ireland had even kicked off against Germany. 1. Germany 20pts 2. Poland 20pts 3. Republic 16pts 4. Scotland 11pts|
|20:08 BST: Mesut Ozil has a goal in Dublin disallowed for offside as the Republic struggle to contain Germany. 1. Germany 20pts 2. Poland 20pts 3. Republic 16pts 4. Scotland 11pts|
|20:32 BST: Matt Ritchie equalises for Scotland with a stunning goal. 1. Germany 20pts 2. Poland 18pts 3. Republic 16pts 4. Scotland 12pts|
|21:03 BST: Steven Fletcher puts Scotland ahead for the first time with another brilliant goal as they close in on third place. 1. Germany 20pts 2. Poland 17pts 3. Republic 16pts 4. Scotland 14pts|
|21:19 BST: Shane Long stuns Germany with a goal to put Republic of Ireland ahead - and into the top two. 1. Germany 19pts 2. Republic 18pts 3. Poland 17pts 4. Scotland 14pts|
|21:35 BST: With the last kick of the game, Robert Lewandowski scrambles in a dramatic equaliser for Poland - eliminating Scotland. 1. Germany 19pts 2. Poland 18pts 3. Republic 18pts 4. Scotland 12pts|
- 2HuttonBooked at 67mins
- 8BrownBooked at 56mins
- 7FletcherSubstituted forMcArthurat 74'minutes
- 10NaismithSubstituted forMaloneyat 69'minutes
- 6ForrestSubstituted forDorransat 84'minutes
- 13RybusBooked at 22minsSubstituted forWawrzyniakat 71'minutes
- 8KrychowiakBooked at 83mins
- 16BlaszczykowskiSubstituted forOlkowskiat 83'minutes
- 7MilikSubstituted forJodlowiecat 62'minutes
- Viktor Kassai
- Shots on Target
Second Half ends, Scotland 2, Poland 2.
Goal! Scotland 2, Poland 2. Robert Lewandowski (Poland) left footed shot from very close range to the bottom left corner following a set piece situation.
Kamil Glik (Poland) wins a free kick in the attacking half.
Foul by Matt Ritchie (Scotland).
Attempt saved. Grzegorz Krychowiak (Poland) right footed shot from outside the box is saved in the bottom right corner.
Kamil Glik (Poland) wins a free kick in the defensive half.
Foul by James McArthur (Scotland).
Delay over. They are ready to continue.
Delay in match (Poland).
Attempt missed. Kamil Grosicki (Poland) header from the centre of the box is too high. Assisted by Lukasz Piszczek.
Substitution, Scotland. Graham Dorrans replaces James Forrest because of an injury.
Grzegorz Krychowiak (Poland) is shown the yellow card for a bad foul.
Foul by Grzegorz Krychowiak (Poland).
Alan Hutton (Scotland) wins a free kick in the attacking half.
Substitution, Poland. Pawel Olkowski replaces Jakub Blaszczykowski.
Attempt missed. Lukasz Piszczek (Poland) right footed shot from the centre of the box is too high. Assisted by Kamil Grosicki.
Attempt blocked. Tomasz Jodlowiec (Poland) right footed shot from outside the box is blocked. Assisted by Jakub Blaszczykowski.
Foul by Robert Lewandowski (Poland).
Matt Ritchie (Scotland) wins a free kick in the defensive half.