India took command on Day 3 of the Test match as the hosts took a 326-run lead.
Mohammed Shami and Umesh Yadav took the first two wickets on Day 3 to send half-the-team back to the pavilion for a total score of 53.
Faf du Plessis (64) then built a partnership with Quinton de Kock (31), but the latter's dismissal proved to be the turning point again.
Keshav Maharaj (72) then steered South Africa's ship alongside Vernon Philander (44*) to take the Proteas total to 275.
Ravichandran Ashwin removed Maharaj and Rabada to bowl the Proteas out.