Advertisement
Deal Elgar (160) and Quinton de Kock (111) made impressive centuries for the visitors.
Off-spinner Ravichandran Ashwin was pick of the bowlers for India, registering fine figures of 7 for 145.
South Africa still trail India by 71 runs.