Theunis de Bruyn scored a defiant maiden Test century but Rangana Herath spun Sri Lanka to a 199-run victory in Colombo to whitewash South Africa on day four.
Sri Lanka needed just five wickets to complete a convincing 2-0 series win on Monday, but De Bruyn and Temba Bavuma showed some much-needed resistance to keep the hosts waiting.
De Bruyn (101) played with patience in a superb 232-ball innings, putting on 123 for the sixth wicket with Bavuma (63) under pressure from the potent Sri Lanka spinners.
Herath came to the fore yet again, though, striking twice just before lunch and finishing with figures of 6-98 - his 34rd five-wicket Test haul - to eventually dismiss the tourists for 290.
Suranga Lakmal, who bowled only two overs in the match, has now won all three Tests since stepping in to replace suspended captain Dinesh Chandimal.
It's a wrap! Sri Lanka beat South Africa by massive 199 runs and seal the 2-match series 2-0!— Sri Lanka Cricket (@OfficialSLC) July 23, 2018
SA 124 & 290 (86.5 Ovs, Herath 6/98) v SL 338, 275/5dhttps://t.co/ne7t5sHYOe #SLvSA #LionsRoar #OneTeamOneNation pic.twitter.com/pwwiiIBiKk
De Bruyn, promoted to number three in his sixth Test, was solid in defence and took every opportunity to attack after South Africa resumed on 139-5, reaching his 50 by punching Dilruwan Perera to the cover boundary.
Bavuma took a more positive approach, sweeping with assurance and striking Akila Dananjaya to the ropes twice in an expensive over.
The diminutive right-hander made it through to his half-century when he swept Herath for a single, but the slow bowler had him caught behind to end a long partnership, then removed Quinton de Kock just before the interval.
De Bruyn continued to tick along with support from Kagiso Rabada, who danced down the track to launch Herath for a huge straight six.
The excellent De Bruyn reached three figures by glancing Herath to the fine-leg boundary but was on his way four balls later, bowled offering no shot to gift the left-armer a fifth wicket in the innings.
Dilruwan (2-90) saw the back of Rabada for 18 and Danushka Gunathilaka took a high catch to consign South Africa to defeat as Dale Steyn failed in his attempt to hit Herath for a second six.
|Solskjaer to United: Cardiff stint not relevant to Old Trafford challenge, says Berg|
|Manchester United´s on-field results must improve to maintain commercial strength - sports finance e|
|Rashid and Carey inspire winning start for Strikers|
|Solskjaer to United: Phelan to continue Mariners role during coaching stint|
|Malone: Jokic an MVP contender|
|Solskjaer to United: Returning heroes - the hits and misses|
|Solskjaer to United: Ole´s best moments for United|
|Solskjaer to United: Club writing off two seasons with interim appointment - Fletcher|
|Allen´s LeBron block made statement - Atkinson|
|Solskjaer to United: Molde give blessing for their manager to take job on temporary basis|
|Dragons land Eels playmaker Norman|
|Black Caps tried everything - Williamson|
|Solskjaer to United: Red Devils´ interim boss in numbers|
|Solskjaer to United: Other Ferguson pupils who became teachers|
|Manchester United appoint Solskjaer until end of season|
|Kane a doubt for north London derby|
|Mourinho sacking changes things – Tuchel|
|Nets top Lakers in Brooklyn, extend winning streak to six games|
|LeBron on Lakers potentially acquiring Davis: That would be amazing|
|Rain helps Sri Lanka claim draw against New Zealand|
|Mourinho had to ´take the consequences´, says Klopp|
|Ausilio: Icardi has offer on table, won´t be sold to Juve|
|Chargers lead NFL Pro Bowl selections, Brees named NFC starting QB|
|Pro Bowl 2019: Chargers lead NFL with 7 selections, Drew Brees named NFC starting QB|
|Savea re-signs with All Blacks, Hurricanes|
|Flanagan facing de-registration as Sharks, Tigers cop huge fines|
|Napoli rejected £95m offer for Koulibaly amid United links – De Laurentiis|
|Kovac feels for axed United boss Mourinho|
|Rabiot, we do not need you – PSG fans respond to wantaway midfielder|
|Guardiola hails assured debut from Man City youngster Garcia|
|He´s very happy at Tottenham – Arsenal boss Emery wants Pochettino to reject Manchester United|
|Rams sign RB C.J. Anderson|
|Good luck with the Red Devils - Norway PM´s message for Solskjaer|
|Pogba was ´dancing on the grave´ of Mourinho - Neville|
|Solskjaer set to replace Mourinho after Man United gaffe|
|City signing Steffen up to Guardiola´s goalkeeper demands, says Berhalter|
|Mourinho is so strong - Guardiola backing for fallen rival|
|Mourinho? Ausilio dismisses Inter return after United sacking|
|Whyte needs to raise his game to beat Chisora again - Haye|
|Brussino leads late Tenerife rally as Venezia down Holon|
|Orleans 1 Paris Saint-Germain 2: Super sub Diaby sends holders through|
|Leicester City 1 Manchester City 1 (1-3 on penalties): Muric stands tall in poor shoot-out|
|Middlesbrough 0 Burton Albion 1: League One side reach semi-finals|
|Bologna 0 AC Milan 0: Bakayoko sent off as Inzaghi claims point against former side|
|Fortuna Dusseldorf 2 Borussia Dortmund 1: Bundesliga leaders suffer shock first loss|
|Rivera yet to make a call on sitting Panthers QB Newton|
|Pulisic would thrive in Premier League, but Berhalter expects Dortmund stay|
|Raptors coach Nurse fined by NBA for criticising referees|
|Solari ´loves´ struggling Real Madrid star Isco|
|Mourinho sacked: Pogba, Lukaku, Fred and his other Man United signings rated|
|Mourinho sacked: What does it mean for Manchester United players?|
|Ibrahimovic provides short-term pain, long-term gain for US - Berhalter|
|River Plate 2 Al Ain 2 (aet, 4-5 on penalties): Perez misses decisive spot kick|
|De Bruyne and Aguero back for City, surprise debut for Garcia|
|Uncapped Varun ´panicked a little´ after huge IPL deal|
|Replays scrapped for FA Cup fifth round|
|Pochettino readies big guns for Gunners|
|Ex-Wasps star Wade struggling with NFL transition|
|BCCI rejects ´baseless´ claims over Kohli-Paine ´banter´|
|Ibrahimovic re-signs with LA Galaxy for 2019|
|Mourinho sacked: Solari not worried for Real Madrid job|
|Mourinho sacked: 895 days and more than £700,000 in five-star luxury|
|ES Tunis 1 Guadalajara 1 (6-5 on penalties): Dhaouadi holds nerve to settle ill-tempered affair|
|Murphy lands permanent Tigers role|
|Mourinho sacked: Real Madrid´s Marcelo lauds ´great coach´ after United exit|
|Unadkat, Varun the top buys at IPL auction|
|Emery prepared to give youth a chance in north London derby|
|Tottenham extend Vertonghen contract until 2020|
|Panthers safety Reid receives seventh random drug test of 2018|
|Kovac relishing Klopp challenge in Champions League|