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.
|Keys hits 55 winners en route to QFs, Halep claims rain-interrupted match|
|Djokovic-Dimitrov poised as rain wreaks havoc, Del Potro through|
|Tolisso: Pavard to Bayern? I don´t know|
|Ramos: Real Madrid will win again|
|Eagles QB Nick Foles suffers shoulder strain|
|Man City want to dominate English football, warns Walker|
|Golf behind Timberwolves´ draft mishap in 2009? Curry thinks so|
|Puig suspended, Hundley fined for starting Dodgers-Giants brawl|
|Snedeker leads Wyndham Championship with stunning 59|
|Yankees slugger Judge ´frustrated´ with wrist injury|
|Marlins pitcher Urena handed six-game ban for intentionally hitting Acuna|
|Pochettino expects ´toughest season´ yet at Tottenham|
|´You know you are not employing the Pope´ - Diamond has sympathy for Cipriani|
|Khedira still committed to Germany|
|Serena Williams reveals what shook her before worst loss of career|
|Burnley 1 Istanbul Basaksehir 0 (after extra time): Cork cracker sends Burnley through|
|Zenit hit eight in extraordinary Europa League fightback|
|Saints get back to winning ways at Wakefield|
|Giants medical team discovered tumour in Brittan Golden´s mouth|
|Maribor 0 Rangers 0: Gerrard´s men book play-off berth with calm clean sheet|
|Sassuolo reel in Marlon from Barcelona|
|Formula One ´very poor´, says Alonso after quitting|
|Brighton to host Southampton in EFL Cup second round|
|Tiger Woods´ caddie tried to pay heckler to leave Firestone|
|Sordet leads Nordea Masters, Olesen overcomes flight woes|
|Mourinho visits Istanbul Basaksehir before Burnley game|
|Iniesta hails ´worldwide sports legend´ Alonso|
|Onus on Ozil to rise above criticism, says ex-Arsenal star Wright|
|Lahm to head Euro 2024 if Germany wins bid|
|Tennis Australia ´extremely disappointed´ with Davis Cup revamp|
|Snedeker shoots 59 at Wyndham, after bogeying his first hole!|
|Lukaku hints at Belgium retirement after Euro 2020|
|Pellegrini rules out West Ham approach for Toure|
|Association of Spanish Footballers fumes at LaLiga´s US agreement|
|Seibold and Bennett hit out at media speculation|
|Cipriani ´truly sorry´ after pleading guilty to common assault|
|Man City´s Roberts makes Girona loan move|
|Davis Cup revamp passed by two-thirds majority vote|
|Pochettino ready to tackle Man City after Wembley NFL|
|Emery ends Arsenal goalkeeper debate with Cech assurance|
|Shastri: India happy to face Stokes in Nottingham|
|Etzebeth returns for Springboks, Pumas include Figallo|
|Two Serie A matches postponed after Genoa bridge collapse|
|Barrett tight-lipped over Manly future due to ´legal reasons´|
|N´Zonzi is better than Malcom - Monchi takes aim at Barca star|
|Sainz to replace Alonso at McLaren|
|Bayliss encourages Stokes to make public apology|
|Oates hat-trick boosts Broncos´ play-off ambitions|
|Emery needs four transfer windows to impact Arsenal – Wright|
|Spain´s LaLiga plans to play regular-season game in U.S.|
|´Dream come true´ for Robertson to earn Bledisloe Cup start|
|LaLiga match set for USA following groundbreaking Relevent deal|
|FIFA rankings: France number one, Croatia and England soar, Germany and Argentina plummet|
|Hansen hails ´big leader´ Whitelock ahead of 100th cap|
|Cipriani pleads guilty to common assault and resisting arrest|
|PSG snap up Kehrer from Schalke|
|Maitland-Niles facing two months out with broken leg|
|Walker backs City squad strength to overcome De Bruyne blow|
|Thomas & Froome skip Vuelta, named in Tour of Britain squad|
|Thurston rules out retirement U-turn|
|Pumas look to build on Jaguares progress in Rugby Championship|
|Super Cup glory will make Atletico strong - Simeone|
|Rugby Championship 2018: True status of Erasmus´ Springboks rebuild to be discovered|
|LaLiga 2018-19: Coutinho ready to be Barca´s next Brazilian superstar|
|Serie A 2018-19: Can Napoli, Roma, Inter or AC Milan overhaul Juventus?|
|Braves survive skirmish, loss of Acuna to top Marlins|
|Robertson handed surprise start, Hodge gets nod for Bledisloe opener|
|MLS Review: Wayne´s World as Rooney inspires DC United, LAFC win|
|Djokovic and Dimitrov survive but Zverev loses in Cincinnati|
|Rain halts Halep as Muguruza´s defence ends and Wozniacki retires|