Petersen holds up India's push
South Africa lost two late wickets to end day four on 138-2 after being set the small matter of 458 by India to win the first Test in Johannesburg.
After bowling out their opponents for 421 during the afternoon session, the hosts made a good start in their bid to create Test history thanks to openers Graeme Smith and Alviro Petersen.
The pair put on 108 for the first wicket as South Africa attempted to set a new record for a fourth-innings run chase before Smith was then run out by Ajinkya Rahane's throw for 44.
Hashim Amla also perished before the close, bowled for just four when he badly misjudged a delivery from Mohammad Shami that he thought short enough to duck but that ended up clipping the top of his off stump.
Petersen reached stumps unbeaten on 76. Faf du Plessis was alongside him on 10 not out at the close, meaning the Proteas will return on Sunday needing a further 320 runs with eight wickets in hand.
Having resumed on 284-2, India had continued to build their advantage in the morning session, meaning they could afford to lose their last eight wickets for 106 runs and still find themselves in complete control of the match.
Cheteshwar Pujara was the first of them to go, the No 3's maiden Test ton on foreign soil finally coming to an end at 153 when he edged Jacques Kallis to wicketkeeper AB de Villiers.
His departure ended a 222-run stand for the third wicket with Virat Kohli who fell four runs short of recording his second hundred in the series opener.
A short delivery from the part-time spin of JP Duminy looked like offering Kohli the chance to cut away the boundary he needed to reach three figures, only for his attempted cut to end up providing an edge behind to de Villiers.
By that stage Rohit Sharma had already been bowled by Kallis for six, while Duminy claimed a second scalp in the innings when Rahane was caught by Smith at slip for 15.
India skipper Mahendra Singh Dhoni managed 29 before holing out in the deep to Vernon Philander (3-68) who also knocked over Ravichandran Ashwin.
Imran Tahir then belatedly claimed his first wickets of the match, trapping Ishant Sharma lbw and then ending the innings by bowling Shami, who missed an ambitious attempt to slog-sweep the leg-spinner.