|England's Jonathan Trott survives an lbw appeal [AFP]
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.
Set 466 to win - or to bat out a potential 146 overs - England were 132 for three at the close.
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 walked off immediately when umpire Tony Hill gave him out.
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 first innings 291
(J Kallis 108, M Boucher 51; J Anderson 5-63)
England first innings 273
(A Cook 65, M Prior 76; M Morkel 5-75)
South Africa second innings
A Prince lbw b Swann 15
G Smith c Collingwood b Onions 183
H Amla c Cook b Swann 95
J Kallis c Prior b Anderson 46
A de Villiers c Broad b Anderson 34
J-P Duminy c Prior b Anderson 36
M Boucher c Bell b Swann 15
D Steyn not out 1
Total (seven wickets declared, 111.2 overs) 447
Fall of wickets: 1-31 2-261 3-346 4-376 5-401 6-442 7-447
England second innings
A Strauss c Amla b Harris 45
A Cook c Boucher b de Wet 55
J Trott not out 24
K Pietersen lbw b Steyn 6
J Anderson not out 0
Total (three wickets, 51 overs) 132
Fall of wickets: 1-101 2-107 3-129
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.