Half-centuries from Travis Head and Marnus Labuschagne and a last-ball strike by Pat Cummins put Australia firmly in command of the day-night Test against Sri Lanka at the Gabba in Brisbane on Friday.

Head hit a Test best 84 and Labuschagne posted 81 as Australia amassed 323 to hold an imposing 179-run innings lead over the Sri Lanka after the second day.

Sri Lanka lurched into further strife losing the wicket of Dimuth Karunaratne on the last ball of the day by Cummins for three as the tourists had to negotiate a tricky six overs facing the pink ball under lights.

Karunaratne was snapped up behind by Tim Paine as Sri Lanka reached stumps at 17 for one with Lahiru Thirimanne on six to trail by 162 runs overall and battling to avoid defeat with three days left. “A massive wicket. It’s nice to get them one down and break the left-handers up,” Head said.

“I think the way Jhye (Richardson) and Pat bowled against the right handers yesterday by swinging the ball away we can put them under real pressure in the morning.”

Head was trapped leg before wicket by Suranga Lakmal, meaning no Australian batsman has scored a Test century in nine innings against India and Sri Lanka this summer.

“Two of us had opportunities today to go on and get a big score,” Head said. “It’s disappointing to miss the chance to really drive the game and get a massive lead and be still with batters in the shed tonight.”

Labuschagne was out shortly before dinner, also with a maiden Test century beckoning. His patient 150-ball knock ended when he skipped down the wicket to lift a drive only to find the bottom of his bat and was taken at short mid-on by Thirimanne off Dhananjaya de Silva.

Sri Lanka grabbed a few wickets towards the end of Australia’s innings. Cummins was unable to get off the mark in 21 balls before he was squared up by Dushmantha Chameera and tickled a catch behind to Niroshan Dickwella.

Skipper Paine was out first ball, edging a Lakmal outswinger to Kusal Mendis at second slip for a splendid low catch and young Test newcomer Kurtis Patterson showed promising resilience to bat for 82 balls before he was lbw to Lakmal for 30.

Mitchell Starc hit out lustily for 26 with four fours and a six before Jhye Richardson was the last wicket to fall, for one. Lakmal finished with five for 75. “We are still in the game and we need to bat as long as we can and take a lead and put some pressure (on Australia) after tomorrow,” Lakmal said.

“I treasure the Australian five [wickets] because I always had a dream of achieving a five-wicket haul in Australia and it’s a dream come true.”

Head and Labuschagne put on 166 runs for the fifth wicket to seize the momentum and put Australia in command after losing two wickets in the opening session chasing Sri Lanka’s modest 144.

“I think the way myself and Marnus built that partnership put them under pressure to bat for a long period of time and put us in a commanding position,” Head said.

Marcus Harris was out in the first over of the day, spooning a cut shot to Thirimanne at point off Lahiru Kumara for 44 after adding just four to his overnight score. Nightwatchman Nathan Lyon was out three overs later for one, caught at second slip by Mendis off Lakmal, leaving the Australians at 82 for four in the 29th over.

The Sri Lankans struggled to come to terms with the bouncy Gabba wicket after winning the toss on Thursday’s opening day with only Dickwella showing any resistance, hitting 64 from 78 balls.

Richardson, who only came into the side after Josh Hazlewood was ruled out with injury, had figures of 3/26 to lead an impressive Australian display with the ball. Cummins chimed in to clean up the tail, finishing with 4/39. The Brisbane Test is the first of a two-match series against Sri Lanka.