Home side won the second Test in convincing fashion by 199 runs
Sri Lanka on Monday completed a 2-0 Test sweep of South Africa to record their first series win over the Proteas since 2006 after Rangana Herath wreaked havoc with six wickets.
The visitors were all out for 290 in the second session of day four in Colombo, 200 runs short of the highly improbable winning target of 490 on a bone-dry wicket.
It was South Africa's first Test whitewash since they went down in the island nation 2-0 in a two-match series almost 12 years ago.
Sri Lanka had wrapped up the first Test in Galle within three days, reducing South Africa to 73 in the second innings — their lowest Test total since the nation's post-apartheid readmission to international cricket.
"Right through the series we didn't have that ability to score partnerships. I think we only had three partnerships of 50 and above the whole series," Faf du Plessis, South Africa's crestfallen skipper, said Monday. "But once again you have to give credit to the opposition. They were able to put us under pressure for long periods of time and therefore we made a lot of mistakes."
In the second Test, Sri Lanka scored 338 in their first innings and South Africa could only respond with 124 as versatile off-spinner Akila Dananjaya made hay, taking five wickets.
The hosts then scored 275 for five before declaring halfway through the afternoon session on day three, setting the visitors a highly improbable victory target.
They were already five wickets down for 139 at stumps on Sunday, with Dananjaya dismissing du Plessis for seven and left-arm spinner Herath getting Hashim Amla for six.
The South African wickets fell despite a comedy of errors from Sri Lanka, who dropped two catches, wasted both their reviews — on successive balls — and could have had Dean Elgar out twice beforehand had Perera not overstepped.
Theunis de Bruyn and Temba Bavuma kept the Sri Lankan spinners at bay for most of the first session on Monday, putting on a valiant sixth-wicket stand of 123.
Their partnership was South Africa's best ever in a fourth innings in Asia, and was by a distance their biggest of the series, the previous best having been worth only 64.
De Bruyn was especially impressive, sweeping judiciously and defending doggedly on a tough surface, while Bavuma was also adept at picking gaps on the leg side and rotating the strike.
Bavuma's resistance ended just after he was caught behind off Herath for 63. The left-arm spinner also had wicketkeeper-batsman Quinton de Kock lbw for eight on the stroke of lunch.
"I don't think we play spin badly, but if you compare yourself to the subcontinent batters, then they're obviously a step above us in that regard," du Plessis told reporters. "That's where the challenge lies for the South Africa's and the England's and the Australia's of the world."
After lunch, de Bruyn recorded his maiden century — South Africa's only one of the series — but was bowled by Herath for 101.
"Worked very hard and these are the results of that. Sri Lanka has some of the best spinners in the world and that's why we bothered the South African batsmen," Sri Lanka's stand-in-captain Suranga Lakmal said.
Sri Lanka, meanwhile, will take particular joy in this victory, as it came in the absence of their regular captain and middle-order batsman Dinesh Chandimal, who was suspended following a ball-tampering scandal.
The home side's coach Chandika Hathurusingha was also not allowed to be in the team dressing room during match days after being sanctioned over the same incident.
The two teams will now head into the limited-overs series with the first of the five one-day internationals scheduled for Sunday in Dambulla.
Sri Lanka also await England for a full series in October-November while South Africa tour Australia for three ODIs and one Twenty20 in that period.