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 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.

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 Herath getting Hashim Amla for six.

The 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 spinners at bay for most of the first session on Monday, putting on a valiant sixth-wicket stand of 123.

Rangana Herath still in the wickets, but he's decided that he will call time on his career later this year

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.

Congratulations! What a stellar performance by the Sri Lankan cricket team as they become Test Series Champions of the South Africa Tour of Sri Lanka! Best wishes from the Proud Sponsor of the Sri Lanka Cricket Team.#OurLionsOurPride#SLvSApic.twitter.com/twUXnYg0gi