Ryan Rickelton and Wiaan Mulder both hit centuries as South Africa set Australia 288 to win on the final day of the deciding third test at Newlands on Friday. The Proteas need ten wickets.
South Africa, dismissed for 387 in their second innings, recovered from 140-4 overnight thanks to a 154-run stand for the sixth wicket.
Rickelton made 101, his third test hundred and second at Newlands, hitting 12 fours in 219 balls.
Mulder struck 115 from 204 balls with 10 fours and four sixes, his third test century.
The partnership ended in farce when Rickelton was run out charging down the pitch, with Marnus Labuschagne and Josh Inglis combining.
Marco Jansen then fell for a duck pulling Mitchell Starc to Nathan Lyon, before Lyon bowled Simon Harmer for one and Gerald Coetzee was run out for one, too.
Mulder added a valuable 36 for the last wicket with Kagiso Rabada, before falling to Pat Cummins in the final over of the day.
It leaves what would need to be the second-highest successful chase at Newlands to decide the series.