Temba Bavuma and Rassie van der Dussen hit centuries and enabled South Africa to recover from a slow start in the first one-day international against India at Boland Park in Paarl on Wednesday.
South Africa made 296 for four after winning the toss and batting on a slow pitch.
Bavuma, the captain, made 110 and Van der Dussen hit a career-best 129 not out.
The pair put on 204 for the fourth wicket after South Africa had struggled to 68 for three in the 18th over.
It was Bavuma's second one-day international century. He made 113 on debut against Ireland five seasons ago but was playing in only his 14th one-day international. He made his runs off 143 balls with eight fours.
It was also Van der Dussen's second hundred in the format after he scored 123 not out against Pakistan last season.
Van der Dussen transformed the innings, sweeping effectively against the Indian spin bowlers and scoring freely against the faster bowlers.
He faced only 96 balls and hit nine fours and four sixes. Two of his sixes came off free hits after Shardul Thakur bowled no-balls.
Jasprit Bumrah was India's best bowler, taking two for 48.
India were guilty of some poor ground fielding on a swelteringly hot day in the Cape Winelands.
South Africa gave a first one-day cap to left-arm fast bowler Marco Jansen following his success in the recent Test series.
Virat Kohli, who resigned as Test captain on Saturday following the 2-1 defeat by the Proteas, was included in the India line-up.