South Africa reached 38 for no wicket at tea on the fourth day after being set 458 to win the first Test against India at the Wanderers Stadium on Saturday.
India were bowled out for 421 in their second innings, leaving South Africa to negotiate 45 overs before the close of play as well as the whole of the fifth day.
Alviro Petersen (28 not out) and Graeme Smith (nine not out) batted solidly, although Petersen survived a loud appeal for a catch behind the wicket off Mohammed Shami in the last over before tea.
Umpire Rod Tucker ruled that the ball had flicked his thigh pad and replays showed he was correct.
Earlier, Indian batsmen Cheteshwar Pujara and Virat Kohli took their third wicket stand to 222 before Pujara was caught behind off Jacques Kallis for 153.
Kohli fell four short of his second century of the match, making 96 before being caught behind, cutting at off-spinner JP Duminy.
The South African bowlers, who had endured a torrid third afternoon at the hands of Pujara and Kohli, came back strongly despite being without the injured Morne Morkel and India lost four wickets while scoring 74 runs in 28.2 overs before lunch.
At that stage, India were 394 ahead but captain Mahendra Singh Dhoni decided not to declare and the innings continued until mid-afternoon.
Zaheer Khan was the main beneficiary of the decision to bat on and hit a breezy 29 not out, which included sixes off leg-spinner Imran Tahir and fast bowler Dale Steyn.
Steyn, the world's number one ranked Test bowler, had one of his poorest matches. He failed to take a wicket in the second innings and conceded 104 runs in 30 overs, leaving him with match figures of one for 165.
Steyn's new ball partner Vernon Philander finished with three for 68, the same figures as all-rounder Kallis, who had to carry a bigger than usual bowling load in the absence of Morkel, sidelined with a sprained right ankle suffered while fielding before lunch on Friday.
Pujara made the highest score for India in a Test at the Wanderers before he had virtually his first lapse of concentration, flashing at a ball outside the off stump from Kallis. He batted for 353 minutes and faced 270 balls in an innings which included 21 fours.
Kohli batted for 254 minutes and 193 balls, hitting nine fours. – AFP