Skipper AB de Villiers hit 96 Friday and predecessor Graeme Smith regained his limited overs form with a brisk 68 as South Africa totalled 299-7 against Sri Lanka in the fourth one-day international.
Number three De Villiers hit eight fours and three sixes off 76 balls before being bowled by Thisara Perera with the ball slamming into middle stump after an attempt to steer it down leg side backfired.
Smith managed only six, 28 and two in the first three matches of the series, triggering a media and public outcry that led to De Villiers coming out in support of the Test captain.
He struck seven fours and a six off 69 balls at sun-drenched De Beers Diamond Oval in the northern Cape city before being caught by Sri Lankan captain Tillakaratne Dilshan off the bowling of Lasith Malinga.
His dismissal 23.5 overs into the innings was soft with the bat turning in his hand as he attempted a leg-side shot off a delivery that was short of a length.
De Villiers won the toss and opted to bat as South Africa sought a 4-0 lead over the visitors ahead of the final match in Johannesburg, and they put 84 runs on the scoreboard before Alviro Petersen (37) was first to fall. Colin Ingram was trapped leg before just four balls after the departure of Smith.
Brief scores: South Africa 299-7 (De Villiers 96, Smith 68, Herath 2-45)