Skipper Dean Elgar scored an unbeaten 46 as South Africa in pursuit of 240, reached 118/2 at the end of Day 3 of the second test against India in Johannesburg on Wednesday.
Resuming at a overnight score of 85/2, the pair of Cheteshwar Pujara and Ajinkya Rahane added 70 more runs before Kagiso Rabada broke the stand by dismissing Rahane for 58.
Rabada also trapped Pujara (53) leg before wicket with a full-length delivery that nipped back in sharply from outside off.
Rishabh Pant while trying to smash Rabada over extra cover, nicked one behind the stumps for a duck.
Ravichandran Ashwin after scoring a couple of impressive boundaries was caught down the leg side off Lungi Ngidi for 16. India went into lunch at 188/6, with an overall lead of 161.
Shardul Thakur scored a valuable 24 ball-28 before being caught at deep square leg by Keshav Maharaj off Marco Jansen.
Jasprit Bumrah smashed Rabada for a six but fell soon after for 7, top-edging a Ngidi delivery to Jansen at point.
Hanuma Vihari in the end remained unbeaten on 40, as India were bowled out for 266 with an overall lead of 240.
For the Proteas Rabada, Ngidi an Jansen claimed 3 wickets each.
Chasing 241, Aiden Markram and Dean Elgar got South Africa off to a solid start. The pair added 47 runs for the opening stand before Thakur provided the break through by dismissing Markram leg before wicket for 31.
Keegan Petersen and Elgar featured in a 46 run stand for the second wicket before the former missed a flick and was adjudged leg before wicket for 28.
Rassie Van der Dussen provided good support to his skipper in an unbeaten 25 run stand as the hosts ended Day 3 at 118/2, still requiring a further 122 runs to win and level the series.
Stumps at the end of Day 3
India 2nd innings-266 all out. ( Cheteshwar Pujara 53, Ajinkya Rahane 58, Hanuma Vihari 40*) vs South Africa 2nd innings 118/2 (Dean Elgar 46*, Rassie van der Dussen 11*) need 122 more runs.