Dean Elgar and Quinton de Kock kept the skilful Indian spinners at bay with memorable hundreds, orchestrating South Africa's spirited counter-offensive against the fancied hosts in the series-opening Test at Visakhapatnam on Friday.
South Africa were reeling at 39 for three before the start of day three and Indian spinners were expected to run through the opposition. But Elgar (160 off 287) thwarted their plans with his 12th Test hundred, which also made him the first South African to reach three figures in India since Hashim Amla in 2010.
He got valuable support from skipper Faf du Plessis (55) and Quinton de Kock, whose aggressive knock of 111 off 163 balls took South Africa closer to India's first innings total of 502.
At close of play, the visitors were 385 for eight in 118 overs, trailing India by 117 runs.
The Indian bowlers toiled on a hot day with limited success. Off-spinner Ravichandran Ashwin brought the home team back in the final session with a double strike, picking up his 27th five-wicket haul in Tests in the process.
Ravindra Jadeja also reached a milestone when Elgar top-edged a sweep to Cheteshwar Pujara at deep mid-wicket, giving the spinner his 200th Test wicket.
With that dismissal, Jadeja became the fastest left-arm bowler to 200 wickets, reaching the mark in his 44th Test.
India may be still ahead in the game but South Africa won a lot of fans with their determined effort in testing conditions.
The Proteas came to the crease with a positive intent and did not allow the famed Indian spin duo of Ashwin and Jadeja to dictate terms. Elgar, de Kock, du Plessis -- all of them were not afraid to use their feet against the spinners.
Barring the odd ball jumping off the wicket, there did not seem to be any demon in the surface. Such was the intent from both Elgar and de Kock that they brought their respective hundreds with sixes.
After resuming the day at 39 for three, South Africa took tea at 292 for five to frustrate the Indian bowlers. Elgar collected 18 fours and four sixes in his epic innings while de Kock hammered 16 boundaries and a couple of maximums.
Elgar and du Plessis shared 115 runs for the fifth wicket before de Kock joined the centurion in the middle.
Du Plessis' was the only to wicket to fall in the extended afternoon session when Ashwin had the South African captain caught at leg gully against the run of play. The visitors made 153 runs in the session which lasted 37 overs.
The Indian spinners were expected to pose the biggest threat going into day three but Elgar tackled them by mixing caution with just the right amount of aggression.
He took the aerial route at the slightest opportunity to release pressure. Elgar got to three figures in style, dispatching Ashwin for a spectacular six over the cow corner.
After du Plessis' dismissal in the 58th over, de Kock joined Elgar in taking the attack to the spinners.
The wicketkeeper-batsman batted in limited-overs mode. India also tried part-time spinners Hanuma Vihari and Rohit Sharma but to little effect.
Earlier, Elgar and du Plessis resisted the Indian attack by taking South Africa to 153 for four at lunch.
Considering what transpired in the final session on Thursday, South Africa were expected to surrender rather quickly but Elgar and du Plessis played with determination.
Ashwin, who looked menacing in the final session on Thursday, could not get a wicket in the morning.
Elgar grew in confidence and was successful in executing the aerial hits and shots through the ground.
Elgar, like all South African batsmen, had a forgettable tour of India four year ago. He brought his 14th Test fifty with a single in the 40th over. A little later, the southpaw smashed Jadeja for two sixes and a four in the same over.
Pacer Ishant Sharma picked up the sole wicket to fall in the session when he got one to jag back in sharply and trap Temba Bavuma (18) in front of the stumps.