Keshav Maharaj and Vernon Philander battled for 43.1 overs in the Pune heat to put on 109 runs for the ninth wicket but India managed to regain control of the proceedings by achieving a 326-run lead by the end of day three of the second Test.
Although India are still firmly placed as favourites to clinch another Test series win at home, Maharaj's courageous stand with Philander earned accolades.
South Africa were down in the doldrums at 162-8 shortly after lunch but Maharaj, batting with a bruised shoulder, and Philander resisted India's bowling charge to delay being dismissed for a low score.
The left-arm spinner made his maiden half-century in Test cricket en route to a fighting knock of 72 from 132 deliveries.
He was dismissed towards close of play by Ravichandran Ashwin, who also trapped Kagiso Rabada lbw to wrap up the tourists' innings at 275 all out.
South Africa resumed batting on the third day at a perilous 36-3 and soon lost nightwatchman Anrich Nortje to fast bowler Mohammed Shami.
Theunis de Bruyn was nicked behind by Umesh Yadav as the Proteas were 53-5 in the first hour before Quinton de Kock and skipper Faf du Plessis withstood India's bowling attack.
Du Plessis departed for a well-composed 64 leaving the lower order to once again rescue the side while de Kock could not build on his decent start and perished for 31 runs.
Maharaj and Philander then dug in deep, making the hosts toil hard for the crucial breakthrough.
Philander, who was preferred over paceman Lungi Ngidi for his all-round skills, batted patiently for his unbeaten 192-ball 44.
Maharaj, still recovering from the pain in his shoulder, later revealed his strategy to counter the variable bounce on the sluggish surface.
"It's (shoulder) very sore. Yesterday I dived on it so a lot of bruising. But hopefully, I'll be fine for the rest of the series.
"Vernon and I said to ourselves that we'll just get through to tea and see after that. Being a lower order batsman your fingers do itch to play a big shot but Vernon kept me in a good mind space.
"After a few pulls, I felt normal (in the shoulder). It's better to be positive because if you go into your shell a ball with your name will come along sooner or later," he said.
He admitted adjusting his technique to nullify the threat posed by Ravindra Jadeja, who picked up only one wicket in the innings.
"I wanted to stay outside off stump to spin, I tried to stay leg side of the ball for (Ravindra) Jadeja.
"We saw (Mohammed) Shami got the ball to reverse, and the wicket is deteriorating, but the longer you bat, the easier it is."
South Africa face a tall task of saving the match if they are to avoid a series defeat after losing the first game by a huge margin of 203 runs in Visakhapatnam.