A 31st Test century from captain Ricky Ponting helped Australia avoid an embarrassing defeat to minnow Bangladesh in the first Test in Fatullah, but only by three wickets.
Ponting, who finished unbeaten on 118, withstood a rapid loss of partners to rebuff Bangladeshi claims for only their second Test win, guiding the tourists past the victory target (307) 25 minutes after lunch.
The on-song Australian skipper wasted no time after the restart, cracking three boundaries in consecutive overs to complete a comeback three-wicket win to the relief of the touring party.
The current No.1 ranked Test batsman in the world - following a remarkable year with the bat - once again provided stubborn resistance as the tourists teetered on the brink of defeat.
He survived a dropped catch on 97 to build a seventh-wicket stand of 46 with Brett Lee and steady the ship after the early loss of overnight not out batsman Adam Gilchrist.
Lee came to the middle after Gilchrist (12) and Shane Warne (five) had succumbed to the wizardry of Mohammad Rafique in the first half-hour of play.
After impressing with a patient 144 on days two and three, Gilchrist lapsed back to bad habits when he played across the line to a spinning delivery which pitched and uprooted off stump.
Then, when a clearly undecided Aleem Dar adjudged Warne leg before in Rafique's following over, the Australians had slumped from a comfortable 173-1 to 231-6 - still 76 runs short of a winning total.
But Lee again highlighted his blossoming status as a Test all-rounder with a watchful, and often untroubled, 29 despite the deteriorating status of the pitch.
In an innings reminiscent of his heroics in saving the third Ashes Test in Manchester, Lee carefully selected the deliveries to attack from nudging singles to crashing a huge six back over Enamul Haque's head.
However, just when it seemed he and Ponting would see off the second new ball, he edged paceman Mashrafe Mortaza to wicketkeeper Khaled Mashud to set Aussie pulses racing again.
Ponting then survived a dropped chance by Mortaza in the deep in the penultimate over of the morning session before finishing the job in style after the break.
Rafique produced another creditable haul of 4-98 to finish with his best Test match bowling figures of 9-160 in his 25th appearance.
With valuable support from fellow spinner Enamul and opening batsman Shahriar Nafees, Rafique's nine wickets were the mainstay of Bangladesh's unlikely assault on Australia's No.1 Test status and surpassed his 7-116 against Pakistan in Multan in 2003.