Australia trail by 120 runs with 8 wickets remaining at stumps on day 3 of the second Test.
Quinton de Kock scored a sparkling century and paceman Kyle Abbott captured two wickets before bad light halted South Africa's march on day three of the second Test on Monday, with Australia still 120 runs shy of making the tourists bat again.
Abbott dismissed openers Joe Burns for a duck and David Warner for 45, before Usman Khawaja (56 not out) and captain Steve Smith (18 not out) steadied to push Australia to 121 for two on a day littered with rain squalls at Bellerive Oval.
The home side remained in a perilous position with two days to play after South Africa, fired by De Kock's 104, were dismissed for 326.
The Proteas' pacemen bowled superbly after tea, beating the bat repeatedly off the seam but reaped little reward, barring Warner's wicket.
Warner's luck ran out when Abbott had the ball rebound off the left-hander's hip and elbow before it dropped to knock off the bails.
An enthralling battle between Vernon Philander and Khawaja ensued, with the Australian number three surviving a string of play-and-misses before raising his half-century with a flick through mid-wicket.
Khawaja's defiance cheered the small crowd which had watched Australia collapse for 85 on the opening day and were denied action on day two due to rain.
The batsman earlier survived an lbw appeal off the bowling of Philander, but umpire Richard Kettleborough was unmoved and South Africa lost their second review.
Burns, trapped lbw by Abbott for one run in the first innings, lasted four balls before nicking behind off the same bowler.
De Kock shone on a mostly gloomy day, raising his second test century before lunch in a decisive 144-run stand with Temba Bavuma.
After hammering debutant paceman Joe Mennie off his pads to the fence past mid-wicket, De Kock poked a single square to get his ton and soaked up the applause with a low-key celebration.
Eventually bowled by paceman Josh Hazlewood, De Kock had earlier been reprieved on 72 when wicketkeeper Peter Nevill missed a stumping chance off spinner Nathan Lyon.
It was an otherwise chance-less innings.
Hazlewood rallied after a difficult morning to clean up the tail, finishing with 6-89, while Mennie captured his first Test wicket when Bavuma miscued a pull to Lyon at point and was out for 74.
Philander contributed a valuable, quickfire 32 before being caught behind off Hazlewood to wrap up the Proteas' innings.
South Africa won the series-opener in Perth by 177 runs.