Jasprit Bumrah took 5/42 as India bowled South Africa out for 210 and then drove home their advantage with the bat, as they ended day two of the decisive third and final test on 57/2 in their second innings at Cape Town.
India's lead is 70, already a sizeable one on a difficult, seaming wicket that is offering plenty of assistance to the bowlers and has seen 22 wickets fall on the opening two days of the contest.
Captain Virat Kohli is not out 14 in an unbeaten partnership of 33 with Cheteshwar Pujara (9) and they will attempt to take the game away from the home team on the third morning as they chase a first-ever series win in South Africa.
Both openers were dismissed as Mayank Agarwal (7) was caught by Dean Elgar off Kagiso Rabada and KL Rahul (10) was grabbed by Aiden Markram at slip from the bowling of Marco Jansen.
Bumrah gave a masterclass of seam bowling in the South African innings as he got the ball to move both ways and at times leap off the surface.
Keegan Petersen scored a career-best 72 for the home side but played almost a lone hand in the innings with the next highest score being Temba Bavuma's 28.
Petersen, in just his fifth test, showed admirable patience as he batted for 166 balls before becoming the fourth victim for Bumrah when he edged to Pujara at slip.
It is the kind of surface where batsmen never quite feel settled at the crease and the fact that the ball might misbehave at any point is always in their minds.
Mohammed Shami (2-39), Umesh Yadav (2-64) and Shardul Thakur (1-37) were also among the wicket-takers for the tourists.
The series is level at 1-1 after India won the first test at Pretoria by 113 runs, before South Africa bounced back to claim the second at Johannesburg by seven wickets.