Australia ended their World Cup on a high with two second-half goals in a 2-1 victory over Serbia but Germany's defeat of Ghana meant neither side would go though to the last 16 of the World Cup.
Tim Cahill and Brett Holman scored for Australia deep into the second period before Marko Pantelic hauled Serbia back into their final Group D game in Nelspruit.
Australia's effort dragged them off the bottom of the group but it was too little too late as Ghana edged them out of the last 16 on goal difference.
Serbia had the first opportunity when Milos Krasic, booed by Australia's sizeable following after a tumble in the box moments earlier, burst into the box and fired at Mark Schwarzer from a tight angle.
Australia were struggling to handle the speed of the Serbian attacks and were grateful when Schwarzer stuck out an arm to deny Chelsea's Branislav Ivanovic from inside the six-yard box.
Australia were limited to firing in crosses from deep but it was 32 minutes before Serbia failed to deal with one and Cahill headed his side's first good chance wide.
Australia began the second period with more purpose and won a free-kick after Cahill tangled with Nemanja Vidic. Marco Bresciano drilled the set-piece in low but Nikola Zigic was back to clear.
Zdravko Kuzmanovic headed a good chance wide for Serbia but the eastern Europeans were starting to look concerned and they paid the price for their earlier profligacy as Luke Wilkshire picked out Cahill with a superb cross in the 69th minute - and the Everton star headed powerfully home in familiar fashion.
Serbia were rattled and Australia began to sense an unlikely opportunity as substitute Holman broke forward four minutes later and unleashed a ferocious shot that flew past Vladimir Stojkovic from 30 yards.
Serbia grabbed a lifeline six minutes from time as Schwarzer spilled a long-range Zoran Tosic shot and fellow substitute Pantelic pounced from close range. That allowed them to regain their composure and they created one last gilt-edged chance but Pantelic was unable to convert.
Copyright (c) PA Sport 2009, All Rights Reserved.