|Kallis, who resumed the day on 159, needed just 65 deliveries to reach his double century [GALLO/GETTY]
Sri Lanka lost two wickets after taking a pounding from South African batsmen Jacques Kallis and AB de Villiers on the second day of the third and final Test at Newlands on Wednesday.
Sri Lanka were 149 for two at the close in reply to South Africa's 580 for four declared, a deficit of 431 runs.
Kallis made a career-best 224 and De Villiers hit an unbeaten 160 before the declaration.
Sri Lankan captain Tillakeratne Dilshan hit a dashing 78 before he was caught at deep mid-on off leg-spinner Imran Tahir.
Fellow opener Lahiru Thirimanne was earlier bowled by Morne Morkel for 23 as Sri Lanka set out on the massive task of playing themselves back into the match after Dilshan's decision to send South Africa in backfired spectacularly.
South Africa scored at better than four runs an over and were able to declare in mid-afternoon in an attempt to push for a series-clinching victory.
Kallis was out in the last over before lunch when he was caught at mid-on off left-arm spinner Rangana Herath after batting for 435 minutes.
He faced 325 balls and hit 31 fours and a six. His fourth wicket partnership with De Villiers was worth 192.
South Africa added 106 runs in 28.3 overs before lunch before the scoring rate rocketed after the interval as De Villiers and Jacques Rudolph (51 not out) piled on another 127 runs off 20.3 overs in 79 minutes.
South Africa first innings
G Smith b Prasad 16
A Petersen c Dilshan b Welegedera 109
H Amla lbw b Prasad 16
J Kallis c Mathews b Herath 224
A de Villiers not out 160
J Rudolph not out 51
Total (4 wkts dec, 139 overs) 580
Fall of wickets: 1-25 (Smith), 2-56 (Amla), 3-261 (Petersen), 4-453
Sri Lanka first innings
L Thirimanne b Morkel 23
T Dilshan c Smith b Imran Tahir 78
K Sangakkara not out 35
M Jayawardene not out 7
Total (2 wkts, 39 overs) 149
Fall of wickets: 1-70 (Thirimanne), 2-126 (Dilshan)
De Villiers reached his century off 176 balls and then cut loose, adding another 60 off 29 balls. His innings included 19 fours and two sixes - the latter hit off successive balls from Dilshan.
Kallis, resuming on 159, hit boundaries off his first two balls of the day, from Dhammika Prasad.
But he had an escape on 171 when Prasad was able to make a ball deviate enough off the pitch for Kallis to edge it low to second slip where a diving Mahela Jayawardene got his fingers to the ball but was unable to hold on.
There was more good fortune for Kallis on 183 when he edged Angelo Mathews between wicketkeeper Dinesh Chandimal and Jayawardene, who was at a wide solitary slip.
Kallis, playing in his 150th Test, reached his double century off 280 balls with 29 fours and a six. His previous double century came against India at Centurion last season when he made 201 not out.
Indicative of the dominance of the batsmen, the Sri Lankan bowlers were able to deliver only two maiden overs on Wednesday, both by the left-armed Chanaka Welegedera early in the day.
The pitch continued to play easily when Dilshan and Thirimanne launched Sri Lanka's reply. They put on 70 before the left-handed Thirimanne was bowled by a full-length delivery from Morkel, four runs after being missed at third slip by De Villiers.
Dilshan raced to the fastest half-century of the match, off only 41 deliveries, but fell in Tahir's second over when he went for a big hit but mistimed the ball and was caught by a diving South African captain Graeme Smith two-thirds of the way to the long-on boundary.
Kumar Sangakkara and Mahela Jayawardene, Sri Lanka's two most experienced batsmen, saw their side through to the close.