Sri Lanka won the final group game of the Commonwealth Bank Series, claimng a 13-run victory over a stuttering Australia at the MCG.
Nothing rested on the game, with the hosts and India already qualified for the final, and it looked like being just a tune-up for the Australians when they bowled Sri Lanka out for 221 with only half centuries from Tillakaratne Dilshan and Mahela Jayawardene keeping the innings alive.
Adam Gilchrist hit a superb 83 in his last international match at the MCG, but when he went Australia's batting line-up imploded as they lost five wickets for just ten runs.
Allan Border Medal winner Brett Lee almost dragged Australia over the line with a defiant 37 in a last-wicket stand with Nathan Bracken, but he was bowled in the penultimate over with the hosts still 13 runs short.
The win ensures that Sri Lanka at least have some pride as they exit the series, and it will give Ricky Ponting's men some thinking to do ahead of the final against India.
Australia looked to have the upper hand after dismissing Sri Lanka for 221 all out with Bracken the main threat with the ball, taking 4-29.
Brett Lee took the first of his two wickets early on to get rid of opener Dilruwan Perera for just five before Sanath Jayasuriya was caught by Hopes at third man, but unfortunately he was over the ropes and it was six.
Jayasuriya did not last long though as he went for 23 when caught by Mike Hussey - and the same man also caught Kumar Sangakkara who went for just 11.
When Chamara Kapugedera was out for just two Sri Lanka languished on 61-4 before Dilshan and Jayawardene went about their rescue act.
The two put on 64 for the fifth wicket until Jayawardene was trapped lbw by Brad Hogg for 50, but Dilshan went on to amass 60 with Chamara Silva before being run out for 62.
Silva's 35 was the only other innings of note as the Sri Lankans were bowled out off the last ball of their innings for 221.
If Sri Lanka's score did not seem enough before the start of Australia's reply, it looked even worse when Gilchrist and Hopes piled on a quick-fire opening stand of 107.
Gilchrist's farewell tour continued in style as he smashed 83 off just 50 balls in his final MCG appearance for Australia.
Hopes had already gone for 28 by the time Gilchrist was well caught in the deep by Lasith Malinga and he left to a rousing reception after a dashing innings containing 12 fours and two sixes.
With Australia on 113-2 they still seemed well on course for victory, but their batting engine room suffered an almighty collapse with five wickets going down in all for the addition of just ten runs.
Michael Clarke scratched around for 11 balls before being bowled for a duck by Ishara Amerasinghe, who finished with three wickets, while skipper Ricky Ponting made just one from 11 balls before he was trapped lbw by Nuwan Kulasekara.
Andrew Symonds also failed to trouble the scorers with his four-ball duck, leaving Australia in deep trouble as they flopped all of a sudden to 115-5.
Brad Haddin could only muster seven before being trapped lbw by Malinga, while even Mike Hussey could not rescue the hosts as he was bowled by Chamara Kapugedara for five.
With Australia on 142-7, at least Hogg could make it into double figures for his last international at the MCG after announcing his retirement, and he made 21 before being bamboozled by Muttiah Muralitharan.
At 173-9 Australia still needed 49 from their last-wicket partnership, but Lee is never a man to give up the ghost and, with fine assistance from Bracken, led the fightback.
Lee hit a fine 37 and a final-wicket partnership of 35 dragged the Aussies close to the finish line with 14 needed from the last two overs.
Veteran Jayasuriya came on for the penultimate over and he duly bowled Lee to end a dramatic match.