Suryakumar Yadav hit a dazzling century as India set South Africa a challenging target in the third and final Twenty20 international at the Wanderers Stadium on Thursday.
Suryakumar made 100 in a total of 201 for seven after India were sent in to bat.
The Indian captain thrashed eight sixes and seven fours in making his fourth T20 international century off 55 balls.
But Suryakumar was then caught at deep square leg and India lost three wickets, including a run-out, in the final over, bowled by Lizaad Williams.
They needed a scrambled two by Mohammed Siraj off the last ball to top 200 on an excellent batting pitch.
Suryakumar said at the toss that he was happy to accept the challenge of putting runs on the board and defending a total.
A partnership of 112 off 70 balls between Suryakumar and Yashasvi Jaiswal (60) provided the bulk of India's total.
Suryakumar went out to bat after left-arm spinner Keshav Maharaj took two wickets off successive balls in the third over.
He was relatively subdued and took 23 balls to make his first 25 runs but then unleashed his full array of strokes, including hits for leg-side sixes off good length balls.
With the first match rained off, South Africa lead the series 1-0.
Brief scores:
India 201-7 in 20 overs (Y Jaiswal 60, S Yadav 100; K. Maharaj 2-26, L. Williams 2-46).
Match situation: South Africa need 202 to win.
Toss: South Africa.