South Africa began the day at 36 for three but a rearguard action through Keshav Maharaj (72) and Vernon Philander (44) helped them cross the 250-run mark.
India vs South Africa, 2nd Test Day 2: Virat Kohli's career-best puts Proteas on the mat
India vs South Africa 2nd Test: Mayank Agarwal's century, Virat Kohli's fifty power hosts to 273/3 on Day 1
IND vs SA, 1st Test: 'Five-star' Shami, brilliant Jadeja star in big India victory
IND vs SA, 1st Test, Day 3: Ashwin's fifer puts hosts on top after Elgar, De Kock centuries