Dean Elgar's first century against India helped South Africa mount a spirited fightback at Visakhapatnam, but the Proteas still have work to do after finishing day three of the first Test on 385-8, 117 runs behind.

After India had declared on 502-7 the day before, Elgar (160) and Quinton de Kock (111) were in inspired form, leading South Africa through several moments when it looked as though the hosts' attack was getting on top.

Elgar did offer a chance to wicketkeeper Wriddhiman Saha on 74, but he escaped and went on to take full advantage, playing the spinners with skill and application as he secured his 12th Test hundred before eventually becoming Ravindra Jadeja's 200th Test victim.

De Kock also caught the eye, while the 55-run contribution from captain Faf du Plessis was applaudable, though India still find themselves in control ahead of day four, with the knocks from Mayank Agarwal (215) and Rohit Sharma (176) on Tuesday proving vital.

The tourists were soon reduced to 63-4 after resuming in deep trouble on 39-3, Ishant Sharma trapping Temba Bavuma in front for 18, but a stand of 115 between Elgar and Du Plessis frustrated India.

Elgar clattered Jadeja for two sixes in an over and was given a life when he edged the same bowler behind but Saha was unable to cling on and the Proteas recovered to 153-4 at lunch.

Du Plessis continued to play positively, dancing down the track to hit Ravichandran Ashwin down the ground for six and the captain had his half-century early in the afternoon session.

He failed to go on, though, and his assertive knock ended tamely when he was taken by Cheteshwar Pujara at leg slip off Ashwin. 

Elgar continued to play the spinners with authority and the left-hander brought up a hard-earned hundred in style by slog-sweeping Ashwin for a fourth six of his outstanding innings.

De Kock adopted his usual aggressive approach, showing great timing with classy drives as the runs flowed and the wicketkeeper-batsman raced to 50 in 79 balls. 

Elgar took two boundaries off a Jadeja over to move on to 150, but the opener finally fell out of the blue, departing to a standing ovation after Pujara held on running in from square leg to allow Jadeja to reach his milestone.

Ajinkya Rahane failed to take a difficult chance to remove Senuran Muthusamy without scoring and De Kock took the same approach as Elgar to move to three figures, dispatching Ashwin for a big six.

De Kock's resistance eventually failed on 111, however, Ashwin sending a wicked delivery through the gate and he then claimed Vernon Philander for a duck from the final wicket of the day.