Sri Lanka completed a 2-0 Test sweep of South Africa on Monday to record their first series win over the Proteas since 2006 after an emphatic 199-run victory in the second Test.
Rangana Herath claimed six wickets with his left-arm spin to help bowl out the visitors, who were chasing 490 for victory, for 290 in the second session of day four in Colombo.
It was also 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.
Earlier in the morning, Rangana Herath struck twice to dent South Africa's fightback led by an unbeaten half-century by Theunis de Bruyn on day four of the second Test on Monday.
South Africa, chasing 490 to win, were 246 for seven at lunch with De Bruyn batting on 85 in Colombo. The visitors need another 244 runs to avoid their first series whitewash since 2006 when they lost 2-0 in Sri Lanka.
De Bruyn recorded South Africa's first fifty of the series early in the morning session and Temba Bavuma, who made 63, followed his overnight partner as the duo put on 123 runs.
Bavuma's resistance ended just after he was caught behind off Herath, who also got wicketkeeper-batsman Quinton de Kock lbw for eight on the stroke of lunch.
De Bruyn and Bavuma kept the spinners at bay for most part of the session after the visitors started the day on 139 for five.
De Bruyn was especially impressive, sweeping judiciously and defending doggedly on a tough surface, while Bavuma was also adept at picking gaps on the legside and rotating the strike.