After spending 10 months outside the team, veteran spinner Ravichandran Ashwin finished with seven wickets as South Africa's innings ended on 431 on Day 4 of the first Test at Vizag. India have a lead of 71 runs.
A spirited performance from lower-order batsmen Keshav Maharaj and Senuran Muthusamy and some power hitting display from speedster Rabada in the end on day four ensured the Proteas remained just 71 short of India's first innings total.
South Africa fought back impressively as Dean Elgar and Quinton de Kock both scored their maiden Test centuries against India on the third day to go into Day 4 trailing by 117 runs.
South Africa reached 394/8 without losing any wicket on Day 4 - this total is the highest by a visiting team after losing the toss in India since 2013. Earlier, Bangladesh (388) held the record for the same.
Veteran R Ashwin ended lower-order resistance by looping the ball in the air as Maharaj tried to go for a big hit but mistimed it straight to long-on to give the veteran his sixth wicket.
With Kagiso Rabada as next batter, South Africa trailed by 105 runs with 1 wicket remaining in the innings.
The last-wicket pair of Rabada and Muthusamy really frustrated the India bowlers at one point. India also had an unsuccessful review against Rabada which further agitated skipper Kohli.
The last-wicket partnership did considerable damage to India's chances, adding 35 runs. However, Ashwin got Rabada LBW out for 15 off 17 balls - an innings that consisted of three fours.