The Socceroos are out of the World Cup but have exited with dignity with a brave 2-1 win over Serbia in their final Group D match in Nelspruit.
Germany's 1-0 victory over Ghana in the other Group D match being played simultaneously in Johannesburg effectively finished off the Socceroos regardless of their best efforts at the Mbombela Stadium.
Australia finished equal with Ghana on four points behind group winners Germany, but missed out on second place and qualification for the round of 16 on goal difference.
The Socceroos recovered from being under heavy first half pressure to perform magnificently in the second.
They netted goals through Tim Cahill and substitute Brett Holman in a manic five-minute period which threatened to turn the group on its head.
But in the end, it wasn't enough to overcome the heavy goal difference differential they needed to oust the Ghanaians from qualification.
The Socceroos' slim hopes were dashed entirely when Serbia netted a late goal through substitute Marko Pantelic in the 83rd minute as the Socceroos committed numbers forward.
Socceroos coach Pim Verbeek praised his players' performance, but admitted the opening match 4-0 loss to Germany which wrecked their goal difference had been costly.
"They stood up when everybody thought it was over. A great performance (in the 1-1 draw) against Ghana, today we played all or nothing," said Verbeek, who now leaves the Socceroos after two and a half years in charge to take up a junior coaching role with Morocco.
"The moment we lost 4-0 we knew we had to win two games. In the end the goal difference made a difference and we can only blame ourselves for that.
"I'm disappointed for the players because they gave everything in the last two and a half years to go to the final 16."
Serbia finished bottom of the four-team group.
The Serbs, who like Australia needed to win to remain alive in the tournament, had the better chances in the opening 45 minutes.
But a great Mark Schwarzer save from a Branislav Ivanovic shot after 22 minutes denied Serbia the lead from their best opportunity of the half.
The Australian keeper thrust out his right-hand to stop Ivanovic from point-blank range.
The Socceroos simply ground their way back into the contest with sheer heart, and found a predictable route to goal when Cahill headed home a Luke Wilkshire cross in the 69th minute.
Then substitute Holman produced his second in consecutive World Cup matches - a stunning low long-range strike on the run from midfield four minutes later.
Australia either needed more goals from themselves or Germany in the other match, and despite their best efforts found neither.
Then their hopes faded when Schwarzer failed to deal with a low Zoran Tosic cross, and Pantelic gleefully tapped in from close-range.
Josh Kennedy had a late chance to make things interesting for Australia with four minutes left but shot wide.
Serbia also had a late penalty claim for handball against Cahill waved away by the referee, while Pantelic missed a gilt-edged opportunity to equalise but shot over with an open goal begging.
Germany now play Group C runners-up England in the round of 16, while Ghana take on that group's winners United States.