Travis Head and Marnus Labuschagne missed out on their first centuries in Test cricket but helped to ensure Australia was in command of the day-night Test against Sri Lanka after the second day Friday.
Head and Labuschagne combined for Australia's best partnership in more than a year with 166 for the fifth wicket. The hosts were eventually all out late on day two for 323 in reply to Sri Lanka's 144, a lead of 179 runs after the first innings.
Sri Lanka was 17 for one in its second innings, reducing the deficit to 162 runs at stumps.
Labuschagne's 81 was a breakthrough innings for the South African-born Queenslander, who was a controversial selection for Australia's last test of the India series at the Sydney Cricket Ground.
He played with patience and control, hitting three boundaries — all against spinners as he swept them when full and straight and got on the back foot when there was width.
However a triple-figure score, which would have helped his Ashes cause, still eluded him when he pushed one to short mid-on from spinner Dhananjaya de Silva.
Head was trapped lbw for 84 to a ball from Suranga Lakmal.
"Very disappointing to not get a hundred, but it's nice to spend time out there when the ball is swinging because it's one part of my game over the years that's been tested," Head said. "It's now starting to show a bit of a reward."
Marcus Harris also missed out on a chance for big runs when he bunted a short ball to point in the first over of the day on 44, while debutant Kurtis Patterson hit 30.
Lakmal claimed his third five-wicket haul in tests with figures of 5-75, as he also got nightwatchman Nathan Lyon edging for 1.
Pat Cummins, on the last ball of the day, dismissed Dimuth Karunaratne caught behind for 3.