India's opening batsman Mayank Agarwal converted his maiden Test hundred into a double century as they declared for 502 for seven before the hosts' spinners made early inroads into the South African batting order on Thursday.
After Rohit Sharma's potentially career-defining 176 in his first innings as a Test opener, it was Agarwal's turn to dominate the bowlers as the 28-year-old made 215 before the hosts declared on day two of the first Test at Visakhapatnam.
India's spinners Ravichandran Ashwin and Ravindra Jadeja then got in on the act by dismissing South Africa opener Aiden Markram, No. 3 Theunis de Bruyn and nightwatchman Dane Piedt to leave the touring side reeling at 39/3 at stumps.
In a worrying sign for South Africa, who lost 3-0 on their last trip to India in 2015, a few deliveries kept low on a pitch already offering turn for the spinners.
India lost Cheteshwar Pujara, captain Virat Kohli and Ajinkya Rahane cheaply in the second session, but still managed to put an imposing first-innings total on the board.
Playing only his fifth Test, Agarwal, who had a previous highest score of 77, drove South African spin spearhead Keshav Maharaj for two runs to long off and threw his hands in air after bringing up his double hundred.
Starting the day on 202 without loss, India's openers treated South Africa's bowlers with the same disdain they showed on the rain-interrupted opening day on Wednesday.
Visiting captain Faf du Plessis packed his fielders on one side of the wicket but both Rohit and Agarwal scored almost at will, taming the spinners by employing both conventional and reverse sweep shots.
South Africa, who lost their previous series at home to Sri Lanka 2-0, looked desperately short of ideas in the face of the batting onslaught.
Rohit and Agarwal, opening the batting for India together for the first time, stitched together a stand of 317 - a record for any wicket for India against South Africa.
The only player in the world with three double hundreds in One-Day Internationals, Rohit appeared set for his first in the longest format but was out stumped off South African spin spearhead Keshav Maharaj.
Dropped on 126 by Quinton de Kock off seamer Vernon Philander, Rohit hit Maharaj for his sixth six and followed it up with a four but the left-arm bowler spun the next one past his forward defence for the wicketkeeper to whip the bails off.
Philander removed Pujara for six with the first delivery of the second session while Kohli, who made 20, offered a tame return catch to debutant all-rounder Senuran Muthusamy.
Karnataka batsman Agarwal, who hit 23 fours and six sixes in his knock, added 53 for the third wicket with Kohli and a further 54 for the fourth with Rahane (15) before he holed out off a tame full toss from part-time spinner Dean Elgar.