Australia needed half-centuries from Usman Khawaja, Alex Carey and Pat Cummins to stay in contention against the West Indies after day two of the second test in Brisbane.
After the tourists were dismissed for 311, Australia slumped to 54-5.
But opener Khawaja hit 75, Carey 65 and Cummins 64 before the hosts declared on 289-9, still 22 runs behind.
Josh Hazlewood removed Tagenarine Chanderpaul just before the close to leave West Indies 13-1, a lead of 35.
The tourists added 45 runs to their overnight score of 266-8. Debutant Kevin Sinclair was the last man out, hitting Nathan Lyon for four and six to reach his half-century before being stumped next ball.
West Indies then tore into the Australia batting line-up, with Kemar Roach taking the wickets of Steve Smith, Cameron Green and Travis Head in quick succession to leave the hosts reeling on 24-4.
Alzarri Joseph, who finished with 4-84, then removed Mitchell Marsh to leave Australia five down and still 257 runs behind.
But wicketkeeper Carey launched a punchy counter-attack, scoring 65 from just 49 balls, with Khawaja anchoring the innings at the other end.
When Carey and Mitchell Starc fell in quick succession Australia were 161-7, but Cummins blasted 64 from 73 deliveries to lift them to within sight of the West Indies' total.
Captain Cummins then declared with Australia nine down, giving his bowlers around 35 minutes under the lights in the day-night Test.
The decision paid off when Chanderpaul was given out on review after a thin edge off Hazlewood through to Carey with the final ball of the day.
- This story was first published on [BBC https://www.bbc.com/sport/cricket/68107458]