Set a target of 212 runs, South Africa were 101 for at the close of play on the third day of the third Test against India at Newlands, Cape Town on Thursday.
Captain Dean Elgar and Keegan Petersen seemed in good touch in the run chase before the former was caught behind off Jasprit Bumrah in the last over of the day for 30. Petersen was unbeaten on 48 as the hosts ended the day 111 runs adrift of a possible victory.
Openers Aiden Markram and Dean Elgar played out seven overs before Mohammed Shami ended their stand as he scalped Markram for 16 in the eighth over.
Petersen joined skipper Elgar in the middle and the duo kept moving the scoreboard along before Bumrah dismissed the South African captain.
Earlier in the day, Rishabh Pant scored a defiant unbeaten century as India was bundled out for 198 in the second innings.
For the hosts, Marco Jansen took four wickets while Kagiso Rabada and Lungi Ngidi took three each.
The two sides are tied 1-1 in the three Test series.
India : 223 and 198 (Rishab Pant 100*)
South Africa : 210 and 101/2 (Keegan Petersen 48*)