Cape Town:South Africa were frustrated by a century opening stand between Andrew Strauss and Alastair Cook but remained on course for a series-levelling win on the fourth day of the third Test against England at Newlands on Wednesday.
Set 466 to win - or to bat out a potential 146 overs - England were 132 for three at the close.
South African batsman AB de Villiers cautioned that victory was not inevitable.
"We're in a very good position. We worked very hard to get in this position and we will have to work very hard tomorrow," he said.
Strauss (45) and Cook (55) survived some hostile new ball bowling and stayed together until the 37th over before, with just over an hour's play remaining in the day, Cook made a crucial error, top-edging a pull against Friedel de Wet to send the ball high in the air for wicketkeeper Mark Boucher to make an easy catch.
Strauss followed three overs later when he was caught at short leg off bat and pad off left-arm spinner Paul Harris.
England's hopes of saving the match suffered a major blow shortly before the close when Kevin Pietersen was leg before wicket to Dale Steyn, two balls into the fast bowler's last spell of the day.
Pietersen had earlier been given out leg before to De Wet but he sought a review of umpire Daryl Harper's decision and was reprieved when it was clear he had edged the ball into his pad.
But there was no doubt about the decision when he walked across his stumps against Steyn and he headed for the dressing room immediately when umpire Tony Hill gave him out.
Cook admitted that victory was probably out of the question for England but hoped his team could escape with a draw, as they did against Australia in Cardiff last year and in the first Test of the current series in Centurion.
"We've got a lot of confidence from the situations we've been in, so hopefully we can do it one more time," he said.
Cook said the pitch was playing better than had been expected earlier in the match, although there was some assistance for left-arm spinner Paul Harris when he pitched into the rough and there was 'a little bit' of variable bounce.
Morne Morkel and Steyn both bowled well at the start of the final innings but Strauss and Cook batted resolutely.
Steyn induced an edge from Strauss in the second over but it fell short of Graeme Smith at first slip. Six overs later he had two close leg before wicket appeals turned down by umpire Tony Hill and South Africa decided not to seek reviews.
Strauss responded in Steyn's next over with three off-side boundaries off successive balls.
South Africa added 135 runs for the loss of five wickets in 31.2 overs on Wednesday before Smith declared.
Smith took his overnight score of 162 to 183 as he and Jacques Kallis batted comfortably against the second new ball, which was taken at the start of play.
Smith showed attacking intent as he added 21 runs off 29 balls but was caught on the fine leg boundary when he top-edged a hook against Graham Onions. He made his 183 off 272 balls with 25 fours.
Having successfully asked for a review of a leg before wicket decision when he was on 51, Smith might have survived again had umpire Hill spotted that Onions over-stepped the bowling crease - or Smith asked for another review. England have only bowled two no-balls in the first three matches of the series.
Kallis followed up his first innings century by making 46 before he edged an attempted square cut against James Anderson and was caught behind.
England went on the defensive in the second hour, slowing down their over rate and setting run-saving fields. Only ten overs were bowled after the mid-morning drinks, with Anderson and Stuart Broad both taking six minutes or more to bowl an over.
South Africa went for their shots after lunch when 50 runs were added in 7.2 overs, with all three batsmen who were dismissed falling in a chase for quick runs, including JP Duminy, who made a breezy 36 off 41 balls
Anderson took three for 98 and Graeme Swann three for 127.