Centurion - Hashim Amla steered South Africa to a strong position on a deteriorating pitch on the fourth day of the fourth and final Test against England at SuperSport Park on Monday.
South Africa were 223 for four at tea, a lead of 356. Amla, who made 109 in the first innings, was 96 not out, scored off 193 balls.
James Anderson struck twice in three balls in the fifth over of the morning, having Stephen Cook caught behind for 25, then trapping South African captain AB de Villiers leg before wicket for his second duck of the match.
At that stage South Africa were 49 for three, a lead of 182.
But JP Duminy (29) and Temba Bavuma (63 not out) provided solid support to Amla in partnerships of 57 and 117 unbeaten for the fourth and fifth wickets respectively.
Scoring was slow on a cracked pitch with uneven bounce.
Although any target over 300 would be difficult for England to achieve, South Africa are likely to be handicapped in the final innings, with seam bowler Kyle Abbott unlikely to be able to bowl because of a hamstring injury.
Anderson, whose four wickets in the first six innings of the series had cost 63.50 runs each, had a superb first spell of the day, taking two for seven in six overs.
He bowled a tight line and length and swung the ball both ways. His figures at tea were three for 33 off 16 overs.