NEW DELHI: South Africa produced a brilliant fightback in their pursuit of 350 in the first ODI against India in Ranchi after being reduced to 11/3, becoming only the third team in ODI history to post 300-plus after losing three wickets before reaching 15 runs.

The match went down to the wire as India held their nerves in the end to pull off a 17-run victory to go 1-0 up in the three-match series.

'Success or failure, I stay aware': Virat Kohli gets candid after historic century

Legendary Sunil Gavaskar also heaped praise on South Africa for the way they fought back, dragging the match into the final over despite being reduced to 11/3, and warned India to be very careful in the next two games of the series.

"South Africa's fightback was fantastic to watch. Right till the end, till the last over, it was a question of touch and go, and you have got to admire the way that despite them being in dire straits, three wickets down for 11 runs. The way they have fought back, India better watch out for the next two games," said Gavaskar on Star Sports after the game.

Virat Kohli's record-extending 52nd ODI century, supported by half-centuries from Rohit Sharma and stand-in captain KL Rahul, powered India to a formidable 349 for 8 after being put in to bat in the series opener in Ranchi.

Harsha Bhogle reveals Virat Kohli gave nod before Test comeback question

South Africa's chase began in disaster, slipping to 11 for 3 as Harshit Rana struck twice in a single over with the new ball. But the visitors mounted a remarkable recovery through sensational innings from Matthew Breetzke (72), Marco Jansen (70 off 39) and Corbin Bosch (67 off 51), keeping the contest alive until the final over before eventually being bowled out for 332.

Kuldeep Yadav proved decisive for India, returning figures of 4 for 68 in his 10 overs. His double strike in one over - removing both Jansen and Breetzke - broke South Africa's momentum at a crucial stage.

With a 17-run win, India now lead the three-match ODI series 1-0. The remaining games will be played in Raipur on December 3 and Visakhapatnam on December 6.