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.
|Kante off injured ahead of crucial period for Chelsea|
|Ruthless Saints thrash Hull FC, Warrington thump Rovers|
|Pant sends Capitals top despite Rahane hundred|
|AFC Champions League Review: Xavi stars in last-gasp Al Sadd victory|
|Brentford 2 Leeds United 0: Automatic promotion hopes hanging by a thread for Bielsa|
|Verdasco edges ahead of old rival Lopez in Barcelona, Mayer books Nadal date|
|Martic rallies to oust Zidansek in Istanbul|
|Heavyweight Ali pays the Price for bite|
|Championship Review: Sheffield United put the pressure back on Leeds, Norwich City held|
|Valverde to be patient with returning Barcelona star Dembele|
|Valencia winger Cheryshev to miss Copa del Rey final|
|DaMarkus Lodge relishing chance to prove himself as all-round receiver|
|Hassan named in Afghanistan World Cup squad|
|Bayern ´not easy´ for Sanches, accepts Kovac|
|Sissoko could miss two weeks – Pochettino|
|Pakistan announce Shadab Khan treatment plans|
|Coman and Gnabry impressing Bayern Munich boss Kovac|
|Khan will not retire on Crawford loss|
|Pavard: Bayern signed me because I am one of the best|
|Eels open new home by thumping tame Tigers|
|Folau´s Rugby Australia hearing set for May 4|
|Henderson urges Liverpool to ´keep believing´ in title race|
|McCollum driven by past Blazers failure|
|Hertha confirm broken ankle for rumoured Bayern target Stark|
|Young promises United response in Manchester derby|
|Mbappe won´t leave PSG, insists Tuchel|
|Warriors and Trail Blazers extend leads, Celtics reach Conference semis|
|Red Sox, Yankees claim extra-inning wins to continue turnarounds|
|Matic: Man United didn´t have leaders against Everton|
|Tuchel calls for Champions League patience after Ligue 1 glory|
|MLS Review: Vela leads LAFC rout, New York end winless start|
|Kerr backs Warriors star Curry to bounce back quickly|
|76ers star Butler, Nets´ Dudley fined after playoff clash|
|We always feel the same happiness – Al-Khelaifi revels in PSG´s Ligue 1 success|
|Paris Saint-Germain 2018-19: More goals and tighter at the back – the numbers behind Tuchel´s triump|
|Warriors´ Thompson says he ended slump by jumping in ocean|
|Maiden winner Pan claims RBC Heritage as Johnson capitulates|
|We cannot influence Manchester derby, neither can United – Klopp trolls Solskjaer´s men|
|Stevens proud of Celtics for keeping foot on the accelerator to sweep Pacers|
|DeRozan fined $25k for throwing ball at referee|
|Garcia and Mladenovic put past feud behind them to send France into Fed Cup final|
|I am sure to stay at PSG – Mbappe insists he is not Real Madrid-bound|
|Special Foden has something that´s difficult to find – Guardiola|
|Sarri: Chelsea´s League Cup run on par with Tottenham´s heroics|
|Munster condemn pitch invader who confronted Vunipola|
|NHL awards 2019: Brent Burns, Mark Giordano, Victor Hedman named Norris Trophy finalists|
|Paris Saint-Germain 3 Monaco 1: Mbappe leads title celebrations with hat-trick as Neymar returns|
|Celtics sweep Pacers to advance to semi-finals|
|Neymar makes return from injury as substitute against Monaco|
|Words mean little – De Gea apologetic for disastrous Manchester United performance|
|PSG in Notre Dame jersey tribute against Monaco|
|Benzema the world´s best striker – Zidane|
|Patel the hero as Challengers survive Dhoni´s devastating display|
|Injured PAOK captain comes off bench to celebrate club´s first title in 34 years|
|It is in our hands – Emery confident on Arsenal´s Champions League hopes|
|Liverpool prove to be a cut above Cardiff thanks to Klopp´s pitch-perfect plan|
|Neymar back on the bench for PSG´s clash with Monaco|
|Ringrose: ´Incredible´ Saracens awaiting Leinster in final|
|Hodgson prepared to fight to keep Zaha at Crystal Palace|
|All we can do is keep the pressure on Man City, admits Milner|
|This is my home – Marcelo wants Real Madrid stay|
|Cardiff City 0 Liverpool 2: Resilient Reds return to the Premier League summit|
|Arsenal 2 Crystal Palace 3: Zaha on target as Gunners slip up in top four race|
|Solskjaer: I´ll be successful at Man United... some of these players won´t be|
|Man United were rancid – Neville furious after ´embarrassing´ Everton defeat|
|Silva: Everton better team from first minute|
|Leinster set up Saracens showdown after proving too strong for Toulouse|
|Real Madrid 3 Athletic Bilbao 0: Hat-trick hero Benzema scores for fifth game in a row to seal victo|
|Damned United? The astounding stats as Red Devils hit 38-year low at Everton|
|Everything went wrong – Solskjaer apologises for Man Utd´s Everton horror show|