Rilee Rossouw hit a century as South Africa went in search of a series whitewash in the fifth and final one-day international against Australia at Newlands on Wednesday.
Rossouw made 122 in a South African total of 327 for eight. He and fellow left-hander JP Duminy (73) transformed the South African innings with a fourth wicket partnership of 178 after the hosts lost their first three wickets for 52 runs.
South Africa went into the contest seeking to become the first team to defeat Australia in every game of a five-match one-day series.
Australia's bowlers made a good start after South Africa won the toss, with Scott Boland having Quinton de Kock caught at cover and Joe Mennie bowling both Hashim Amla and South African captain Faf du Plessis.
Mennie, who conceded 82 runs without taking a wicket in his only previous international in Johannesburg, also ended the Rossouw-Duminy stand when Duminy was caught at backward point. He was the best of the Australian bowlers, taking three for 49.
Chris Tremain, another bowler who made his debut during the series, also took three wickets, aided by two in his last over. He conceded 64 runs.
Rossouw hit the ball with great power in making his runs off 118 balls with 14 fours and two sixes, while Duminy was the ideal partner with a combination of silky stroke play and good running between the wickets. Their partnership was worth 178 off 170 balls.
South Africa's total was the third-highest recorded in a one-day international at Newlands.