Sri Lanka were closing on their first Test victory in South Africa as the hosts collapsed to 136 for six at tea on the fourth day of the second Test yesterday.
Jacques Kallis completed the first pair of his Test career as South Africa, set 450 to win, lost five wickets for 50 runs in the afternoon session.
Kallis faced six balls without getting off the mark before top-edging a sweep at left-arm spinner Rangana Herath into his helmet, from where the ball looped to short-leg.
Kallis was initially given not out by umpire Steve Davis, but the decision was overturned.
Jacques Rudolph (22) had chased the fourth ball after lunch from Thisara Perera, edging a wide ball into the slips, where Mahela Jayawardene took the catch.
Hashim Amla looked set to play a major innings as he reached 51, but he dashed off for a quick single to mid-on off Herath, which was turned down by Ashwell Prince, leaving him stranded.
Prince was out for 7 half-an-hour later, when a lifter from Dilhara Fernando forced him to edge a catch into the slips and and Mark Boucher battled hard for being trapped LBW by Herath, also for 7.
A.B. de Villiers was waging a lone struggle to save the game as he went into tea on 17 not out, with Dale Steyn on 1.
Fernando and Herath were causing most of the problems for the South Africa batsmen.
Rudolph and Amla had taken South Africa to 86 for one at lunch after being asked to chase a world-record 450 to prevent Sri Lanka leveling the three-match series.
South Africa comfortably reached 37 without loss before paceman Fernando extracted steep bounce and forced captain Graeme Smith (26) to edge a slip catch to Jayawardene.