Usman Khawaja made a century as Austrlia set a massive total for Sri Lanka to chase. Photo: Dave Hunt/EPA

CANBERRA  Usman Khawaja finally found form again 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 resistence 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.

His brother was charged in December with trying to influence a witness over a case where he allegedly framed a love rival with a fake terror plot.

"It made it tougher to try and concentrate and go out and execute my skills," he said, adding that it had been "very taxing mentally".

It was Australia's fourth century of the match after Joe Burns, Travis Head and Kurtis Patterson reached the milestone in the first innings.

Paine declared with Khawaja on 101 and Head not out 59, following his first innings 161.

But it was far from plain sailing. Marcus Harris again failed, out for 14 with Kusal Mendis taking a superb diving catch at slip off Kasun Rajitha, throwing his Ashes place into question.

Mendis held another catch to dismiss Burns for nine, this time off Vishwa Fernando, and Rajitha struck again to remove Marnus Labuschagne for four.

In an incident-packed morning, Jhye Richardson and Pat Cummins opened with a slew of bouncers.

Both Perera, who resumed on 11, and Dhananjaya de Silva, on one overnight, took blows to the head in the opening two overs.

Perera was then hit flush on the helmet ducking into a Richardson ball on 27.

The neck protector flew off and a physio rushed to his aid. He continued and added two more runs only to call the physio again four balls later.

Once again he opted to bat on but was feeling the effects and was helped off the field soon after.

Ironically, the courageous Karunaratne replaced him after being declared fit again after being felled by a brutal bouncer on Saturday from Cummins.

He had laid prone on the ground for at least 10 minutes before being stretchered off in a neck brace, but after a hospital check was cleared of concussion and given the OK to resume his innings.

The opener returned on 46 and brought up his 22nd Test 50 before being caught at Patterson off Starc after adding nine more.

He was out just three balls after de Silva bizarrely hit his own wicket while attempting a pull shot off Starc. As his bat swung around it took one of the bails off and he was gone for 25.

The tail was quickly polished off with Starc doing the damage, ending with 5-54 to silence his critics after a lean spell.

"Certainly was a great start we had and we thought we could get a very reasonable score in the first innings." Sri Lankan bowling coach Rumesh Ratnayake said.

"But things happened that didn't help us and we are really disappointed with what they got."

AFP