Sri Lanka regained a measure of pride in the fourth ODI, holding their nerve to defeat South Africa by three runs in a thrilling rain-affected encounter on Wednesday.
The Proteas came into this clash holding an unassailable 3-0 lead in the five-match series, but the tourists were undone as they fell just short under the leadership of stand-in captain Quinton de Kock.
Kusal Perera, Dasun Shanaka and Thisara Perera all starred with the bat for the home side, clubbing rapid fifties - Shanaka, on his first ODI appearance in almost two years, the standout with four fours and five sixes in a 34-ball 65 that propelled Sri Lanka to 306-7 from just 39 overs.
A lengthy shower in the early stages of the second innings left South Africa needing 191 from 21 overs - an equation reduced to eight from the last with David Miller on strike but with only two wickets in hand.
And Suranga Lakmal struck the decisive blow, bowling Miller via an inside edge as the Proteas could only reach 187-9 to leave the Kandy crowd jubilant.
Following a couple of early rain delays, Sri Lanka made steady progress with openers Niroshan Dickwella (34) and Upul Tharanga (36) getting starts but at below a run a ball.
Kusal added some impetus, crunching six fours and a pair of maximums en route to a 32-ball 51 before his fun was ended by JP Duminy.
But it was his dismissal that brought Thisara and Shanaka together, the pair hammering 109 in 11.1 overs as the Proteas lost their way at the death - the latter taking 20 from five deliveries in the penultimate set of six bowled by ODI debutant Junior Dala.
Thisara (51 not out from 45) reached his half-century in the final over and after South Africa's reply was halted just two overs in, De Kock perished from the sixth ball following the resumption, missing a Lakmal full toss.
Hashim Amla (40) and Duminy (38) set the foundation for the chase with a 57-stand, ended when the former skewed Akila Dananjaya to backward point. Duminy was looking dangerous, having clubbed three fours and two sixes before he was superbly run out by Shanaka aiming at one stump.
Miller (21 off 17) and Keshav Maharaj (17 from 14) were South Africa's last vestiges of hope, and when both departed in the space of three balls late in the piece, Sri Lanka were able to celebrate avoiding a whitewash.
|Real Madrid 0 Real Betis 2: Zidane´s men humbled in final-day defeat|
|Joshua-Wilder must be next, no excuses - Hearn|
|Trail Blazers need effort over strategy in Game 4 against Warriors - Stotts|
|Fans to receive 82 per cent of Euro 2020 tickets|
|Green: Arguing with officials made me disgusting to watch|
|Kompany appointed as Anderlecht player-manager|
|World class Kompany is Manchester City´s DNA, says Goater|
|Ponga scores stunning double as Knights thrash Dragons|
|Kompany thanks Guardiola and Manchester City team-mates after announcing departure|
|Kompany leaving Manchester City after 11 years|
|Breazeale feels referee stopped Wilder fight too early|
|Green playing ´unbelievably well´, says Kerr|
|Astros get 10th straight win with defeat of Red Sox|
|Warriors´ Iguodala to undergo MRI as Finals beckon|
|Three takeaways from Golden State´s comeback win over Portland|
|Wilder asks for patience over Joshua fight|
|Warriors on verge of NBA Finals after trumping Trail Blazers|
|Wilder retains title with first-round knockout of Breazeale|
|MLS Review: Rooney scores in DC defeat, Wondolowski breaks record|
|Larson wins $1m NASCAR All-Star Race after qualifying in Open|
|Nurse wants Raptors to ´play their a** off´ and change series|
|My last great moment at Allianz Arena – Ribery revels in Bundesliga triumph|
|Eagles defensive end Long announces retirement|
|Ribery, Robben shaped Bayern & Bundesliga – Kovac|
|Favre left disappointed after Dortmund miss out on title|
|Sancho targets Bundesliga glory with Dortmund next season|
|Koepka has no doubts he´ll win US PGA Championship|
|Johnson looking for ´some help´ from Koepka|
|History awaits as Koepka takes record seven-shot lead at US PGA|
|Of course I will be here – Cavani wants to stay at PSG|
|Saunders targets ´big names´ after becoming two-weight world champion|
|Kane stars as USA close on quarter-final berth|
|Lyon president Aulas urges PSG to make Ndombele move|
|Sylvinho, Juninho to join Lyon as coach and sporting director|
|Dupichot and Zebo grab hat-tricks as Racing 92 rout Perpignan|
|Sensational Inoue hammers Rodriguez to win IBF bantamweight belt|
|Do not steal goals, Raheem! Sterling offers explanation for Pep-talk|
|Ouch! Djokovic embarrassed after accidentally hitting ball boy|
|Ronaldo pays tribute to departing Allegri|
|We need to score that chance - Gracia rues Pereyra miss in City humbling|
|Benfica crush Santa Clara to clinch title and pass 100-goals mark|
|Derby strikes and play-off failings – Wondolowski´s MLS goals record in Opta numbers|
|Goal-shy Piatek must focus on Milan - Gattuso|
|There is a score there for me - McIlroy pleased with improved display|
|Guardiola: Man City treble feat harder than Champions League but can be repeated|
|Djokovic edges out Schwartzman to set up Nadal final|
|Koepka still well clear despite slight Bethpage wobble|
|Paris Saint-Germain 4 Dijon 0: Mbappe closes on Messi with brace|
|Guardiola fumes at payment question after FA Cup win|
|Stormers hold Crusaders to dramatic draw after Lions win thriller|
|Mentally I was done – De Bruyne on injury nightmare|
|Sterling denied FA Cup final hat-trick as Jesus awarded Man City´s second goal|
|Guardiola demands improvement from treble-winning Manchester City|
|Madness – Sterling astonished by De Bruyne´s FA Cup cameo|
|Take another look at Manchester City´s sensational six FA Cup final goals|
|Man City treble: Are Guardiola´s men the best team of the Premier League era?|
|Chiefs finish top as Saints edge out Quins for fourth|
|Runaway leader Koepka starts round three at Bethpage|
|Bundesliga 2018-19: Jadon Sancho – Dortmund´s golden boy in numbers|
|Hegerberg hat-trick earns Lyon sixth Women´s Champions League title|
|Magician David Silva makes treble-winning history for Manchester City|
|Man City are the best team in the world - Kompany|
|Man City treble: Five unsung moments in Guardiola´s domestic clean sweep|
|Manchester City 6 Watford 0: Sterling double helps secure unprecedented domestic treble|
|Catalans crush Warriors at Camp Nou in front of record crowd|
|Pliskova beats Sakkari in Rome repeat, Konta upsets Bertens|
|Valencia clinch Champions League qualification on final day|
|Kovac ´convinced´ he will be Bayern Munich boss next season|
|MotoGP Raceweek: Marquez will be ´safer´ in Le Mans race|
|Ewan sprints home to end Giro wait|