Sri Lanka's captain Mahela Jayawardene hit 123 as the hosts survived South Africa's dramatic fightback to record a tense one-wicket victory in the second and final cricket Test in Colombo on Tuesday.
Sri Lanka, set 352 to win, lost three wickets for nine runs to slip to 350-9 after lunch on the fifth day before last man Lasith Malinga drove Nicky Boje for the winning run.
Sri Lanka swept the short two-Test series against the depleted tourists missing the injured duo of captain Graeme Smith and leading all-rounder Jacques Kallis.
The home side had won the first Test by an innings and 153 runs at the Sinhalese Sports Club (SSC) last week.
It was Sri Lanka's most successful fourth innings chase, surpassing the 326-5 they made to defeat Zimbabwe at the SSC during the 1997-1998 season.
Sri Lanka, who were just 19 runs away from victory at lunch with four wickets in hand, were kept in the field for an hour after resumption by the South Africans amidst growing tension at the Sara Oval.
With 11 needed, Jayawardene stepped out to Boje and edged a catch to Herschelle Gibbs in the slips. It was the left-arm spinner's 100th Test wicket in 43 matches.
Seamer Andrw Hall had Chaminda Vaas caught superbly in the slips by AB De Villiers and then clean-bowled Muttiah Muralitharan, leaving Malinga to deliver in the company of Farveez Maharoof.
Maharoof levelled the score with a single off Boje before Malinga drove the next ball to the vacant mid-on region to seal a close win.
Boje finished with four for 111, while Hall took three for 75.