A superb all-round performance by Jacques Kallis carried South Africa to a series-clinching 10-wicket win over Sri Lanka on the fourth day of the third and final test at Newlands.
Having scored 224 in the South African first innings, Kallis claimed three for 35 to end an obdurate Sri Lankan second innings on 342, leaving the hosts with a nominal target of two runs to win.
Kallis also took four catches to equal the South African record for the most by an outfielder in an innings as well as the mark of six catches in a test set by Albert Vogler in 1909/10 and matched by Bruce Mitchell in 1931/32.
South Africa's victory brings to an end a run of four winless series at home dating back to 2008.
They were held up on the fourth day by the determined Thilan Samaraweera, who scored a defiant 115 not out in 325 minutes, off 215 balls.
Angelo Mathews scored 63 and the tail-enders had some fun as they helped the experienced Samaraweera to prolong South Africa's time in the field to nine minutes after the scheduled tea break.
Kallis, who had removed opener Lahiru Thirimanne for 30 on the third day, moved sharply to take a return catch from Rangana Herath (0) and then bowled last man Chanaka Welegedara for 14.
Sri Lanka appeared to be on track to take the game into a fifth day as Samaraweera and Mathews moved the overnight score of 138 for four to 240-4 with their record fifth-wicket stand of 142.
Sri Lanka's previous best fifth-wicket partnership against South Africa was 121 between Aravinda de Silva and Arjuna Ranatunga in 1993/94.
But Mathews, who had shown plenty of strokeplaying ability, was trapped in front of the stumps by a Vernon Philander delivery that kept low in the fourth over after lunch.
Dinesh Chandimal scored just a single before he edged the same bowler into the slips, where Kallis took a sharp catch.
Sri Lanka were 248 for six with Samaraweera on 86, but the tail stayed in long enough for the 35-year-old to reach his 14th century and his second of the series.
Thisara Perera (30) and Dhammika Prasad (16) both prospered briefly with some fairly reckless hitting to save Sri Lanka from
an innings defeat.
While the inspirational Kallis boasted the most impressive bowling figures, he was well supported by Philander, who took three for 54 in 20 overs and has now taken 30 wickets in his first four tests.
Because the first delivery of South Africa's second innings was a no-ball by Prasad, which Alviro Petersen drove down the ground for the winning runs, the innings officially lasted 0.0 overs.