Fulham striker Aleksandar Mitrovic scored a dramatic late winner as Serbia booked their place at next year's World Cup and condemned Portugal to the play-offs.
Hosts Portugal only needed a draw to qualify and looked to have done enough, with Renato Sanches' opener cancelled out by Dusan Tadic's equaliser.
Mitrovic, who started the game on the bench, was sent on at half-time but Portugal were wise to his threat and kept him largely quiet.
However, the home side let their concentration slip in the final seconds and Mitrovic pulled away from his marker to meet Tadic's deep ball and send a downward header into the back of the net.
The goal prompted wild celebrations on the bench and on the pitch from the Serbia players and staff while the Portuguese team stood in disbelief with the home crowd silenced.
Serbia finish top of Group A with 20 points, three more than Portugal, whose hopes of playing in Qatar next year rest on two rounds of play-offs in March.
The defeat also ended Portugal's unbroken winning run in home World Cup qualifiers which had stretched back to October 2013.
It had looked like being a long night for the visitors after they fell behind inside just two minutes when Sanches finished confidently after Bernardo Silva had won possession.
But Serbia did not let their heads drop and deservedly equalised when Rui Patricio failed to keep out Tadic's shot, which crept over the line.
Cristiano Ronaldo, himself familiar with scoring late goals with Manchester United this season, was quiet and came closest with a free-kick in the first half.
Instead it was Mitrovic who provided the drama in the closing stages as his header secured a famous win for Serbia.
Latest Stories
-
CHAN 2024Q: Ghana’s Black Galaxies held by Nigeria in first-leg tie
24 minutes -
Dr Nduom hopeful defunct GN bank will be restored under Mahama administration
57 minutes -
Bridget Bonnie celebrates NDC Victory, champions hope for women and youth
1 hour -
Shamima Muslim urges youth to lead Ghana’s renewal at 18Plus4NDC anniversary
2 hours -
Akufo-Addo condemns post-election violence, blames NDC
2 hours -
DAMC, Free Food Company, to distribute 10,000 packs of food to street kids
4 hours -
Kwame Boafo Akuffo: Court ruling on re-collation flawed
4 hours -
Samuel Yaw Adusei: The strategist behind NDC’s electoral security in Ashanti region
4 hours -
I’m confident posterity will judge my performance well – Akufo-Addo
4 hours -
Syria’s minorities seek security as country charts new future
5 hours -
Prof. Nana Aba Appiah Amfo re-appointed as Vice-Chancellor of the University of Ghana
5 hours -
German police probe market attack security and warnings
5 hours -
Grief and anger in Magdeburg after Christmas market attack
5 hours -
Baltasar Coin becomes first Ghanaian meme coin to hit DEX Screener at $100K market cap
6 hours -
EC blames re-collation of disputed results on widespread lawlessness by party supporters
6 hours