Usman Khawaja finally found form to stroke a fine century Sunday and steer Australia into a massive lead over Sri Lanka as the tourists battle to stay in the second Test at Canberra.
At stumps, the visitors were 17 without loss, chasing a huge 516 to win with two days remaining after Tim Paine declared Australia's second innings at 196 for three.
Dimuth Karunaratne and Lahiru Thirimanne were both unbeaten on eight, weathering some 30 minutes before bad light stopped play slightly early.
Sri Lanka had resumed the third day at 123 for three and in a hostile morning session lost four wickets and Kusal Perera, who retired after being hit on the head by a bouncer.
Their resistance folded in the second over after lunch, with Mitchell Starc taking five wickets to leave them trailing by 319 after Australia's first innings 534 for five declared.
Paine opted against the follow-on in Australia's last Test batting opportunity before the Ashes tour to England later this year.
Khawaja padded up knowing his place in that squad was in doubt after managing a high-score of just 72 across six Tests in a lacklustre summer.
He responded in emphatic fashion, smashing his eighth Test ton off 134 balls.
"Obviously getting a hundred and setting up another game that we can hopefully win, that's the ultimate feeling for the team and for myself," said Khawaja, who admitted it had been a tough few months on and off the field.
SCORES IN BRIEF
AUSTRALIA: First innings 534 for 5 decl and second innings 196 for 3 decl (Khawaja 101 not out, Head 59 not out; Rajitha 2-64)
SRI LANKA: First innings 215 and second innings 17 for no loss.