South Africa beat India by four runs in the third one-day international at Newlands in Cape Town on Sunday.
South Africa won the series 3-0.
Quinton de Kock hit 124 off 130 balls for South Africa, who were bowled out for 287.
India replied with 283, losing their last three wickets for five runs as they were bowled out four balls short of their 50 overs.
India were on track for victory while Shikhar Dhawan (61) and Virat Kohli (65) were together during a second-wicket stand of 98.
India were in trouble at 223 for seven but Deepak Chahar hammered 54 off 34 balls before he was eighth man out with 10 runs needed.
Brief scores:
South Africa 287 in 49.5 overs (Q. de Kock 124, H. van der Dussen 52, D. Miller 39; P. Krishna 3-59).
India 283 in 49.2 overs (S. Dhawan 61, V. Kohli 65, D. Chahar 54; L. Ngidi 3-58, A Phehlukwayo 3-40).
Result: South Africa won by four runs.
Series: South Africa won the three-match series 3-0