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.
|Potter takes over as Brighton and Hove Albion boss|
|Ancelotti happy at Napoli amid Juventus links|
|Hemel Stags on course for Ottawa relocation, New York club a work in progress|
|Nadal overtakes Federer´s top-10 streak|
|Omitting Wahab and Amir would have been foolish - Inzamam|
|Scotland appoint Kilmarnock boss Clarke|
|I´ll keep my place if Pogba arrives at Madrid – Kroos|
|Kroos: Madrid struggles ´normal´ after Champions League dominance|
|Pogba, Hazard and Mbappe in, Bale and Isco out? - Real Madrid set for busy close-season|
|Double amputee Monger stunned by Grand Prix de Pau triumph|
|Walter to take over Stuttgart from next season|
|Giannis expects Milwaukee to buck their ideas up after Game 3 loss|
|Bolivian FA confirms death of referee Victor Hugo Hurtado|
|Australia opener Burns leaves Lancashire for personal reasons|
|Record-breaking female driver Chadwick lands Williams development chance|
|Semedo cleared of concussion to boost Barcelona|
|Iguodala questionable for Game 4|
|Neymar should not captain Brazil at Copa America - Edmilson|
|Wahab, Amir and Asif named in final Pakistan World Cup squad|
|Bale staying at Madrid impossible as Zidane is ´not keen´ - Calderon|
|Kroos agrees Real Madrid extension to 2023|
|Gundogan to renew contract talks with Manchester City|
|Folau opts not to appeal against Rugby Australia ban, still considering options|
|Nadal clear French Open favourite – Djokovic|
|Nedved: No Juve decision amid Sarri and Inzaghi links|
|Gil Marin: We need players totally committed to Atletico|
|Gardner´s big game helps Yankees pull away from Rays|
|This is playoff basketball – Leonard on playing through injury in Raptors win|
|Second most NRL games and 99 tries – Cronk´s career in Opta numbers|
|Spieth: I´m almost back at my best|
|Three takeaways from Raptors´ key Game 3 win over Bucks|
|Trail Blazers star Lillard addresses rib injury|
|Raptors top Bucks in double-OT thriller|
|MLS Review: Nani brace lifts Orlando, Galaxy stunned by Rapids|
|Cronk: It´s been one hell of a ride|
|Johnson upbeat despite falling short|
|Koepka holds on at US PGA – how a dramatic back nine unfolded at Bethpage Black|
|´Phenomenal´ and ´mind-blowing´ – Koepka basks in US PGA triumph|
|NRL great Cronk to retire at season´s end|
|Kevin Muscat to leave Melbourne Victory|
|Bethpage wobble does little to deny Koepka´s status as golf´s dominant major force|
|Brooks Koepka´s timeline of major dominance following US PGA triumph|
|Koepka relieved to retain US PGA title after ´stressful´ finish|
|Allegri seeking a challenge, not a sabbatical|
|Koepka retains PGA title despite back-nine collapse|
|Spalletti tells players to prove they´ve the bottle to play for Inter|
|City want to dominate English football forever, says Laporte|
|Fernando Alonso fails to quality for Indy 500|
|Bordeaux collapse to costly defeat, Stade hopes dashed by Montpellier|
|Valverde pessimistic about Coutinho, Dembele playing in Copa final|
|Koepka collapse sets up grandstand finale at PGA|
|Everyone would want our situation - De Bruyne not concerned by Champions League failure|
|Mbappe drops PSG exit hint|
|Guardiola: I´ll be judged on Champions League record at Man City|
|Gattuso thankful to Milan penalty hero Donnarumma|
|Johnson cuts Koepka lead to four with nine to play at Bethpage|
|Arthur ´very confident´ in Pakistan CWC hopes despite losing streak|
|Juventus 1 Atalanta 1: Mandzukic spares Allegri from defeat in home finale|
|Napoli 4 Inter 1: Spalletti´s side crushed as Champions League race goes to the wire|
|Woakes: World Cup wait makes for nervy Monday|
|Koepka retains control of PGA after early wobble|
|Tsonga topples Lajovic in Lyon|
|Galatasaray edge derby to retain Super Lig title|
|Sabalenka ends clay drought in style with Strasbourg success|
|Here´s to you, Vincent Kompany – The giant of Manchester City´s changing times|
|Wonderful Woakes stars as England wrap up 4-0 win|
|AC Milan 2 Frosinone 0: Piatek and Suso keep top-four hopes intact|
|Messi equals Zarra´s record with sixth Pichichi award|
|Ireland outclass Afghanistan in Belfast|
|Ligue 1 sensation Pepe to leave Lille|