Quinton de Kock scored a superb century as South Africa completed a clean sweep of their three-match one-day international series against India with a tense four-run victory at Newlands on Sunday.
India chose to field and restricted South Africa to 287 all out one ball shy of the 50 overs, but the visitors narrowly failed in their chase as they managed 283 with four balls left in the innings.
Deepak Chahar scored a fine 54 from 33 balls to get India close after they had been 223 for seven, but the visitors lost their last three wickets for the addition of five runs.
“Things got a bit crazy there at the end, the complacency got to us where we thought we had the game in the bag, but we were able to pull it back,” South Africa captain Temba Bavuma said at the post-match presentation.
“It is mission accomplished for us as a team. Not many people gave us a chance in this series, but we will take whatever confidence we can get and keep improving.”
De Kock's 17th ODI century boosted South Africa's total, his 124 coming from 130 balls and he added 134 for the fourth wicket with Rassie van der Dussen who made a solid 52 from 59 balls.
India were on course in their chase when they reached 116 for one in the 23rd over, but two quick wickets proved a massive setback.
Shikhar Dhawan (61) skied a pull shot to wicketkeeper De Kock off seamer Andile Phehlukwayo (3-40), and off his first ball the dangerous Rishabh Pant tried to launch the same bowler for six but was caught at deep cover.
It was poor shot selection from Pant, not for the first time on the tour.
When former captain Virat Kohli (65) departed, only the lively 54 from Chahar got India within touching distance.
“I thought Deepak gave us a real chance of winning the game. It is disappointing to end up on the losing side. It's something we can learn from and get better,” India captain KL Rahul said.
“It is obvious where we have gone wrong, at times our shot selection has been poor. We have played well in patches but did not hold the pressure on the opposition.”
South Africa won the three-match Test series 2-1.