Jasprit Bumrah bowled India to a slender first-innings lead before the Proteas hit back at the start of the second innings on the second day of the third Test at Newlands.
India were 57-2 at the close, an overall lead of 70, with Cheteshwar Pujara on nine and captain Virat Kohli on 14.
Bumrah took 5-42, his seventh five-wicket haul in Tests, as South Africa were bowled out for 210.
It gave India a first-innings lead of 13, but Kagiso Rabada and Marco Jansen dismissed both India openers to keep the match – and the series which is tied at 1-1 – evenly poised.
Keegan Petersen top-scored with 72 for the Proteas but the fragility of the home team’s batting was exposed, with no other batter scoring more than Temba Bavuma’s 28.
Even so, South Africa seemed well placed until Mohammed Shami made a double strike shortly before tea.
With batting conditions seemingly easier in bright sunshine than on the overcast first day, South Africa reached 159-4, with Petersen and Bavuma both batting relatively comfortably.
But the consistently accurate Shami produced a ball that climbed on Bavuma, forcing an edge which was taken by Kohli at second slip.
Two balls later Kyle Verreynne prodded at a good-length delivery from Shami and was caught behind, leaving South Africa with no more recognised batters.
Bumrah followed by bowling Jansen with the last ball before tea and then had Petersen caught at first slip in the second over after the interval.
Petersen had to face the third ball of the morning after Aiden Markram padded up and was bowled by an in-swinger from Bumrah without a run added to the overnight 17-1.
When nightwatchman Keshav Maharaj was bowled by Umesh Yadav for 25, South Africa were precariously placed at 45-3.
The slightly built Petersen batted with skill and application in partnerships of 67 with Rassie van der Dussen (21) and 47 with Bavuma before Shami struck.
His 72, which came off 166 balls and included nine fours, was his second half-century following the 62 he made in the first innings in the previous Test at the Wanderers.
Bumrah, though, was India’s most effective bowler.
He dismissed Proteas captain Dean Elgar on the first evening and posed problems for all the batters on a pitch which still offered good bounce and some seam movement for the bowlers.
Rabada had a hostile opening spell when India started their second innings. Mayank Agarwal was given out caught behind but won a reprieve when a review showed the ball had brushed a pad and not the inside edge of his bat.
But Agarwal made only seven before edging Rabada to Elgar at first slip.
Jansen struck in the next over when KL Rahul was caught at second slip.
Pujara and Kohli prevented any further breakthroughs before the close of play.
© Agence France-Presse
Photyo: Ryan Wilkisky/BackpagePix