|Stuart Broad is driven by Smith as South Africa's batsmen dominate [EPA]
South Africa captain Graeme Smith hit a superb 19th Test century to put the hosts 330 runs ahead of England and in full control of the third Test after the third day at Newlands.
Smith hammered 162 not out as he steered South Africa, 1-0 down in the four-match series, to 312 for two in their second innings, batting with impressive power as he struck 22 fours.
Hashim Amla added a ground record 230 for the second wicket with Smith, but could not manage to score a century himself, being caught at short-leg for 95 off Graeme Swann.
England had lost their last three wickets in six overs in the morning session on Tuesday to be bowled out for 273, Morne Morkel taking five for 75.
South African openers Ashwell Prince and Smith put on 31, their biggest stand of the series, before Prince fell leg before to Swann.
South Africa first innings 291
England first innings (o/n 241-7)
A Strauss c Boucher b Morkel 2
A Cook c Prince b Morkel 65
J Trott b Steyn 20
K Pietersen c & b Steyn 0
P Collingwood lbw b Morkel 19
I Bell c Duminy b Kallis 48
M Prior b Steyn 76
S Broad b Steyn 25
G Swann c Smith b Morkel 5
J Anderson c Smith b Morkel 0
G Onions not out 4
Total (all out; 88 overs) 273
FoW 1-2 2-36 3-36 4-73 5-133 6-174 7-225 8-241 9-241 10-273
South Africa second innings
A Prince lbw b Swann 15
G Smith not out 162
H Amla c Cook b Swann 95
J Kallis not out 20
Total (for 2; 80 overs) 312
FoW 1-31 2-261
Amla played some marvellous off-side strokes while Smith launched his major onslaught in the final session, bashing 97 runs off 117 balls as England spent most of the afternoon in damage control mode.
Off-spinner Swann was the only successful bowler for England, with two for 104 in 33 overs, giving him 18 wickets in the series to date.
Morkel claimed two wickets in the opening over of the day after England, replying to South Africa's 291, resumed on 241 for seven.
Swann gloved a superb lifter angled into the body to Smith at first slip and was caught for five and Jimmy Anderson steered the next delivery to the same fielder for a first-ball duck.
England were still trailing by 50 runs and the situation called for some brave strokeplay, which wicketkeeper Matt Prior provided with a punchy 76 off 118 balls.
He managed to protect last man Graham Onions (4 not out) for nearly half an hour as 32 runs were added, leaving just an 18-run gap between the two sides on the first innings.