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
-
Access Bank Ghana Plc records commendable financial growth in quarter one, 2024
4 mins -
GFA DC charges Bashir Hayford over alleged misconduct in Bechem Utd game
13 mins -
MTN FA Cup: Dreams FC beat Soccer Intellectuals to make semis
1 hour -
Ayorkor Botchwey champions transformative investment, trade agenda
1 hour -
KNUST, University of Rwanda share experiences in implementation of Mastercard Foundation Scholars Program
2 hours -
Top 10 most visited tourist sites in Ghana 2023
2 hours -
Cecilia Dapaah case: I will reopen investigation into alleged acts of corruption – Mahama
2 hours -
GRA boss charges customs officers to be professional ahead of 2024 general elections
2 hours -
NPP thanks stakeholders for successful Ejisu by-election
2 hours -
Bawumia promises to involve chiefs in licensing miners if elected President
3 hours -
Koda should have visited the pastor to avert the prophecy – Ajagurajah
3 hours -
Emotional support alligator taken and released in swamp
3 hours -
A mate is a mate, Bawumia can’t be in the driver’s seat – NDC Communicator
3 hours -
Over 400 million Google accounts have used passkeys, but our passwordless future remains elusive
3 hours -
Kwame Nkrumah Memorial Park surpasses Aburi Gardens as most visited site in 2023 – GTA
3 hours