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.
13. November 2018
|LeBron James on Lakers’ early season struggles: ‘I almost cracked’|
|Welbeck has successful second operation on broken ankle|
|UEFA warns FFP cases can be reopened based on ´new information´|
12. November 2018
|Foakes to keep England place for second Test|
|WATCH: Rooney looking sharp in England training return|
|Mbappe: Money in football is truly indecent|
|Djokovic back to brilliant best as Isner is beaten|
|Celta Vigo replace Mohamed with Cardoso after Real Madrid defeat|
|Joshua intrigued by Usyk, says Hearn|
|Ibrahimovic beats Rooney to MLS Newcomer award|
|Rams WR Kupp out for season with torn ACL|
|Sturridge denies ever gambling on football following FA charge|
|Koeman understands De Ligt´s Eredivisie frustrations|
|Jimmy Butler trade: 76ers acquire Timberwolves star in blockbuster deal|
|´Improve your attitude´ - Deschamps issues Dembele warning|
|Sturridge charged with misconduct over alleged breach of betting rules|
|Saints sign Marshall following Bryant injury|
|Mendy suffers knee injury, leaves France squad with Lacazette|
|Zverev beats Cilic in error-strewn London battle|
|Rafinha replaces injured Casemiro in Brazil squad|
|´One-dimensional´ Australia batsmen need work before World Cup - Finch|
|Mancini keen to work with ´incredibly gifted´ Tonali|
|Italian manager of the year Allegri targets long Juve stay|
|Injured Lee departs as Wales prepare squad for Tonga|
|Conte content to wait until June for coaching return|
|Etzebeth set to return, Whiteley a doubt for Scotland Test|
|In-form Verstappen does not need distractions from 2019 challenge|
|FA asks Guardiola to explain Manchester derby referee comments|
|LaLiga MVP Messi hopes the division stays wide open|
|Murray and Henshaw out of All Blacks Test|
|Injured Man Utd duo Pogba and Martial drop out of France squad|
|Modric cannot always be the best - Dalic|
|Very troubling times - LeBron James alarmed by gun violence|
|Bayern confirm Ribery ´altercation´ with reporter|
|Madrid hit by injuries to Nacho and Casemiro|
|Record-breaking Mushfiqur torments Zimbabwe|
|Spartak Moscow appoint Oleg Kononov|
|Rooney predicts ´exciting time´ after being named in MLS Best XI|
|Former England call-up Graham replaces Thomson in Scotland squad|
|Slater and Thurston among Queensland greats to join Maroons staff|
|Rapana set for six months out after shoulder surgery|
|Alves determined to play in the Premier League|
|Rockets GM denies Anthony will be waived|
|Monaco´s plight not Henry´s fault - Silva|
|It´s like the FBI came - River assistant unable to talk to Gallardo during final|
|Norman says Washington home crowds ´just don´t really care´|
|Bucks beat Nuggets to finish gruelling schedule stretch|
|Madrid ´very happy´ with Solari, says Butragueno|
|Titans stun Patriots, Browns upset Falcons|
|Browns´ Chubb relishes record-breaking performance: It definitely is very special|
|MLS Review: Red Bulls, Atlanta to meet in conference finals|
|Neymar wants more from perfect PSG|
|Higuain is feeling a lot of pressure – Gattuso|
|I didn´t insult anyone, says apologetic Higuain|
|Allegri delighted with Juventus response|
|Kyle Busch wins at Phoenix as Harvick, Truex qualify for Championship 4|
|WATCH: Highlights of thrilling Boca-River Copa Libertadores final|
|PSG coach Tuchel demands more despite Monaco thrashing|
|Boca missed too many chances, rues Schelotto|
|Solari remains tight-lipped on Real Madrid future|
|Hamilton not surprised by Verstappen-Ocon collision|
11. November 2018
|Ronaldo fires Juventus to Serie A record|
|Higuain did nothing serious - Ronaldo hopes Milan striker avoids ban|
|Solari completes perfect Real Madrid audition with fourth straight win|
|Verstappen ordered to do public service after Ocon scuffle|
|Nishikori stuns out-of-sorts Federer|
|Fitzgerald overtakes Owens in career receiving yards|
|Monaco 0 Paris Saint-Germain 4: Cavani hat-trick adds to Henry woes|
|Celta Vigo 2 Real Madrid 4: Solari leads Los Blancos to fourth straight win|
|AC Milan 0 Juventus 2: Higuain sent off in horror show|