SA were in a precarious position at 43-4 overnight after Australia’s pace attack had run through their top order, leaving them trailing by 169 runs after the defending champions scored 212 in their first innings.
But Australia's hopes of more cheap dismissals on Thursday morning were stymied by Bavuma and David Bedingham as they employed a more attacking approach to their batting and put together a 64-run partnership before Bavuma was dismissed.
The skipper went for 36 after driving into the covers and being caught by a diving Marnus Labuschagne off Pat Cummins, who had figures of 2-24 off 14 overs.
Bavuma, whose innings included the first six of the match, had survived an lbw decision earlier when he was on 17 and trapped by Josh Hazlewood.
He took his time before deciding to review the umpire's decision, suggesting he did not hold out much hope of having it overturned, but the snickometer showed he had got bat to ball.
Bedingham was 39 not out, after hitting two boundaries in the last over before lunch, along with Kyle Verreynne on 11.
Verreynne had earlier nicked a Beau Webster delivery but it fell short of the slip cordon.
SA’s batting had none of the nervous defensiveness they showed at the start of their innings on Wednesday but runs still came slowly as they moved into three figures in the 45th over.
--Reuters--