Australia clung to a top 10 finish before its athletes celebrated the end of the London Olympics in a raucous closing ceremony.
With seven gold, 16 silver and 12 bronze medals, Australia ranked 10th on the medal table which gives priority to gold.
The result was the fewest golds for the nation since the 1992 Barcelona Games, where it also won seven.
But only a near-miss to a Kazakhstan boxer, who was given a silver medal despite a tied bout against his Russian opponent, kept Australia's top 10 billing.
If the Kazakh fighter won, Australia would have been relegated to 11th spot.
On the overall medal tally, Australia ranked seventh with 35 medals - well behind the United States who collected 104 medals, including the most gold, 46.
China were second with 38 gold and host nation Great Britain third with 29 golds.
Australia's final appearance at the Games was heralded by sailor Malcolm Page carrying the flag into the Olympic Stadium with the rest of the 203 flag bearers.
The 10,800 athletes poured into the stadium en masse behind them, entering the stadium by filing through the crowd, delighted participants in a ceremony punctuated by the best of Brit music.
Earlier, competition closed with Chloe Esposito recording the best result by an Australian in the women's modern pentathlon - seventh.
Esposito bettered the 14th place in Sydney 2000 of Kitty Chiller, now Australia's deputy chef de mission.
"It's amazing, it makes me feel really good," Esposito said.
Meanwhile, Australian Michael Shelley shocked himself with a 16th place in the men's marathon, with countrymen Martin Dent finishing 28th and Jeff Hunt 63rd.
Shelley clocked two hours 14 minutes and 10 seconds in a race won by Uganda's Stephen Kiprotich in 2:08:09.
"I can't believe it's a top 16," Shelley said.
"I'm shocked and surprised."
Australia's mountain biking couple Dan McConnell and Rebecca Henderson pleaded for more money after their individual races on Sunday.
McConnell finished 21st, bettering his 39th at the Beijing Games four years ago, while Henderson placed 25th on Olympic debut in the women's race.
But their desire for more funding for their sport will likely fall on deaf ears, given the feelings of Australian Olympic Committee president John Coates.
Reflecting on Australia's London campaign, Coates was adamant funding wasn't the problem.
"I am absolutely certain that the sports have to look at themselves rather than look for more money," Coates said.