India were 121 for six at tea on Friday, an overall lead of 162.
Rahul Dravid and Sourav Ganguly put on 84 for the third wicket in a stand which seemed to be taking India a long way towards batting South Africa out of the match and ensuring at least a share of the series, which is tied at 1-1.
But then Ganguly (46) steered a catch to gully off Jacques Kallis and India's scoring rate dropped dramatically as left-arm spinner Paul Harris and seamer Shaun Pollock bowled tightly in tandem.
Dravid reached 47 before going down the wicket to Harris. He failed to get fully to the pitch of the ball and pushed back a simple catch.
VVS Laxman was needlessly run out when he was too casual in taking a second run. Pollock rifled in a return from the midwicket boundary and wicketkeeper Mark Boucher broke the wicket with Laxman's bat on the line, no more than a centimetre from safety. He was given out by television umpire Marais Erasmus.
Sachin Tendulkar, who was prevented from batting in his normal position earlier because he had been off the field too long at the end of South Africa's first innings, struggled for 88 minutes and 62 balls in scoring 14 before he was out in the last over before tea, adjudged lbw to a ball that reverse-swung sharply back into his pads.
It completed a poor afternoon for India, who scored only 48 runs for the loss of four wickets between lunch and tea.
India, starting their second innings with a lead of 41 runs, lost both opening batsmen in the first 14 balls of the day and then were told Tendulkar could not bat at number four after being off the field for 18 minutes at the end of South Africa's first innings Thursday.
There was a six-minute delay before Ganguly appeared on the field and he was almost out first ball when he edged Makhaya Ntini between third slip and gully.
But captain Dravid and former skipper Ganguly batted solidly to add 84 in 131 minutes.
India restored the hard-hitting Virender Sehwag to his opening batsman role in a sign that the tourists intended to bat positively in an effort to win the match and series. But Sehwag slashed wildly at Dale Steyn in the second over to be caught behind for four.
Three balls later, first innings century-maker Wasim Jaffer tried to avoid a bouncer from Ntini and the ball looped off his glove to AB de Villiers at first slip.
Tendulkar was padded up but was told by match officials that he could not bat until another six minutes had elapsed.
The South African fielders asked whether Ganguly, who had to get ready instead, should be timed out but it was ruled that special circumstances applied because fourth official Murray Brown had only arrived in the Indian dressing room to inform them of Tendulkar's situation one ball before Jaffer was second man out.