Australia ended Serbia's quest for the last 16 at the World Cup with a fighting 2-1 victory but it was not enough to take them into the knockout round at the Mbombela Stadium on Wednesday.
The Socceroos hit back magnificently in the second half, rocking the Europeans with two goals in four minutes and shredding their highly-rated defence in their best performance of the tournament.
It was to prove in vain, though, as Ghana, despite their 1-0 loss to Germany in Johannesburg, went through to the second round on goal difference.
Everton midfelder Tim Cahill started it off for the Australians by outjumping Manchester United central defender Nemanja Vidic and heading home in the 69th minute before substitute Brett Holman thumped in a long-range shot four minutes later.
Substitute Marko Pantelic pulled one back with six minutes left, had another chalked off for offside and then put another one over the bar with the goal -- and a place in the last 16 -- at his mercy.
Serbia had been favourites to advance after beating Germany 1-0, while Australia ended their ill-fated campaign on a winning note after being routed 4-0 by the Germans and drawing 1-1 with 10 men against Ghana.
Serbia looked the better team in a scoreless opening half, dominating possession and territory.
Right-winger Milos Krasic looked particularly dangerous and had two scoring chances but Australia saw off the threat.
Australia goalkeeper Mark Schwarzer made a great close-range block of Branislav Ivanovic's shot on 23 minutes after a David Carney error inside the area.
Australia's attack was well corralled by Vidic, with the Serb back four winning virtually all the aerial duels.
Krasic had the ball in the net on 38 minutes but was flagged offside.
Australia picked up two yellow cards with defenders Michael Beauchamp and Luke Wilkshire going into the referee's book early in the second half.
Coach Antic took off Krasic just after the hour and brought on Zoran Tosic as Australia began to have more of the play.
Australia coach Pim Verbeek made a double substitution by throwing on attackers Scott Chipperfield and Brett Holman on 66 minutes and it was to pay swift dividends.
Brett Emerton became the third Australian booked for a 50-50 challenge on Milos Ninkovic as Antic took off giant striker Nikola Zigic and brought on Pantelic.
Australia's persistence finally paid off on 69 minutes when Cahill outjumped Vidic from Wilkshire's cross and headed home past the despairing Vladimir Stojkovic.
Holman let fly with a low, long-range strike four minutes later to put Australia 2-0 ahead to a roar from the huge Australian support.
But Pantelic grabbed one back after Schwarzer could not cleanly claim Tosic's volley, before fluffing his lines by shooting over in injury time with the goal gaping.