A fine knock from Phil Hughes helped Australia into a strong position at 209-3 by stumps on day four of the third Test against Sri Lanka.
Hughes, who came into the match under pressure after making just 76 runs in the first two Tests, struck an unbeaten 122 to all but end Sri Lanka's chances of levelling the series.
He faced increased demands for him to be axed after he was bowled for a second-ball duck in the first innings at Colombo.
But the New South Wales batsman answered his critics in belligerent fashion striking 16 fours and a six to take the tourists into a 52-run lead with seven wickets remaining.
Sri Lanka added just 45 runs for the loss of their four remaining wickets in the morning to close their innings on 473 all out.
But it was not before Angelo Mathews completed his maiden Test hundred, finishing as the last man standing on 105 not out.
Hughes and Shane Watson (21) gave Australia a strong start in reply, putting on 62 for the first wicket, which came when Rangana Herath trapped the latter lbw.
Shaun Marsh, who scored a century in the second Test and 81 in the first innings at the Sinhalese Sports Club, followed six balls before tea after making 18.
But Hughes remained solid at the other end to claim the third Test ton of his career and his first since March 2009 when he scored a century in both innings against South Africa.
Former captain Ricky Ponting was the last men of the day to fall, reaching 28 before he gloved a delivery from Herath to Mahela Jayawardene at slip to leave Australia on 188-3.
Current skipper Michael Clarke saw things through to the close with Hughes, who survived a caught behind shout from Herath with the last ball of the day.