Virat Kohli posted his highest Test score after becoming the first Indian to score seven double centuries to leave South Africa demoralised in Pune.
The hosts' captain hit 254 not out, bettering by 11 his previous format best from almost two years and going past 7,000 Test runs in the process, in a total of 601 for five declared on day two of the second Test.
Having completed his 26th Test hundred - and first of the year - in the morning session, Kohli attacked after lunch and, by reaching 150 for the ninth time, broke Australian Don Bradman's record of most 150-plus scores as captain.
Kohli also eclipsed national heroes Sachin Tendulkar and Virender Sehwag with his seventh double ton and only Bradman (12), Kumar Sangakkara (11) and Brian Lara (nine) have more.
He eventually brought an end to his 336-ball innings, which included two sixes and 33 fours, having shared stands of 178 with Ajinkya Rahan (59) and 225 with Ravindra Jadeja (91 off 104 balls).
However, the torment did not end there for the tourists after they were reduced to 36 for three at stumps, 565 behind, with left-arm spinner Keshav Maharaj taken for precautionary scans on a shoulder problem.
India lead the three-match series 1-0.