David Warner and Matt Renshaw navigated the first eight overs to help Australia reach 27 without loss at the end of the first session Sunday, leaving the hosts needing just 100 runs to win the day-night test against South Africa and avoid a series sweep.
Warner was unbeaten on 20 and 20-year-old Renshaw was not out on 3 at the break, with two more sessions remaining on day four.
The South Africans resumed Sunday at 194 for six, a lead of 70, and were bowled out for 250 within 17 overs.
Opener Stephen Cook faced 240 balls to score 104, his best innings since a century on debut against England in January, before he was bowled by Mitchell Starc (4-80) to finish the innings.
South Africa needed to bat for the first two sessions on day four to build a significant lead in the hope of sweeping Australia 3-0, and was relying on Cook and Quinton de Kock to get there.
But de Kock (5) was unable to produce the kind of innings-reviving knock he played in the first two tests and was out in the fifth over Sunday, adjudged lbw to a straight ball from Jackson Bird after the Australians reviewed the initial not out decision.
Vernon Philander had a reprieve on 9 when Bird was unable to grab a return catch, but was trapped lbw by Starc for 17 as South Africa slipped to 235-8.
Cook, who has been inconsistent during the series, stroked his eighth boundary — a pull against Josh Hazlewood — to reach his second test century just before the drinks interval.
But Hazlewood (2-41) hit back almost immediately to remove Kagiso Rabada (7), who gloved a catch down the legside to Matthew Wade, and Starc beat Cook for pace in the next over.
Australia’s selectors made five changes to the XI after heavy, back-to-back defeats in Perth and Hobart surrendered the three-test series to South Africa.
There are three newcomers in the top six for Australia, with Renshaw partnering up top with vice-captain Warner, Peter Handscomb at No. 5 and Nic Maddinson at No. 6.
Australia scored 383 in its first innings, guided by Usman Khawaja’s innings of 145, in reply to South Africa’s 259-9 declared.