Sri Lanka lose quick three after Australia declare on 654-6
Sri Lanka were 44-3 by stumps on day two at Galle with senior batsmen Dinesh Chandimal, on nine, and Kamindu Mendis, on 13, on guard until rain stopped play.
Left-arm spinner Matthew Kuhnemann struck first to have Oshada Fernando lbw and soon pace spearhead Mitchell Starc got Dimuth Karunaratne caught at gully. Both batsmen made seven.
Veteran spinner Nathan Lyon then sent back former skipper Angelo Mathews out for eight with Travis Head taking a diving catch at short leg.
Khawaja's 266-run third-wicket partnership with Steve Smith, who hit 141 in a landmark innings that got the stand-in skipper to 10,000 Test runs, stood out after Australia elected to bat first at the start of the two-match series.
It was the first time the tourists had breached the 600-run mark in Sri Lanka, surpassing their previous Asian high of 617, posted in Pakistan in 1980.
Wicketkeeper-batsman Alex Carey was unbeaten on 46 with Starc on 19 when Smith declared the first innings in the final session.
Inglis made it count when he walked in after Smith departed on 141 in a landmark innings that got the stand-in skipper to 10,000 Test runs.
He made 102 and with Khawaja kept up the batting surge in a 146-run stand to tire out the opposition attack.
"Hasn't sunk in yet," Inglis told reporters. "Nice to get the team into a very strong position.
"Obviously having played in the sub-continent helps. The training camp in Dubai was really key. We were able to work out our individual plans. If you see all our guys had clear plans."
Khawaja answers critics
Spinner Prabath Jayasuriya broke the partnership to get Khawaja caught behind as the opener walked back after 352 balls that included 16 fours and one six.
Inglis reached his ton off 90 balls as he jumped in delight and punched the air.
But he got out in the next over as he gave away a catch to short cover off Jayasuriya.
Jayasuriya and fellow spinner Jeffrey Vandersay took three wickets each as Sri Lanka toiled for 154 overs.
"The surface didn't change much. They were bowling better lines and a bit quicker and that was the difference," said Vandersay.
"Australia has a mammoth total on the board. We just need to bat long as possible and keep focusing on building partnerships and take one session at a time."
The tourists resumed on 330-2 as overnight batsmen Khawaja and Smith frustrated the opposition attack on a sunny morning.
Khawaja took a single off Jayasuriya to reach 200 as he removed his helmet, raised his bat and dropped down to kiss the turf while teammates and fans stood up to applaud.
His previous best was an unbeaten 195 against South Africa in 2023 at Sydney and he is now the first Australian batsman to make a double ton in Sri Lanka.
He silenced his critics who questioned his future after his recent lean patch with just one fifty in the last 15 innings coming into this week's Test.