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.
|Bryan backs Murray to return after hip resurfacing surgery|
|Spurs´ Aurier arrested on suspicion of assault, released without charge|
|That was a fireworks show - Warriors revel in record-breaking first quarter|
|We are in talks with Chelsea – Salihamidzic reiterates interest in Hudson-Odoi|
|´Proud´ Messi recognises impact of team-mates after reaching 400 LaLiga goals|
|Henry v Vieira: The Arsene Wenger proteges to move into coaching|
|Federer enjoys ´cat and mouse´ win over Evans|
|Wozniacki cruises through in Melbourne|
|Federer maintains perfect Australian Open second-round record|
|Warriors set NBA record, Butler´s 76ers rout Timberwolves|
|´I like the fact we beat them´ - 76ers´ Butler revels in win over Timberwolves|
|Murray says he´ll ´probably´ have operation|
|Australian Open tribute for Andy Murray surprises brother Jamie|
|Warriors score NBA record 51 points in first quarter against Nuggets|
|Panthers owner Tepper doesn´t rule out Newton missing 2019 because of shoulder injury|
|De Ligt will be world´s best centre-back – Koeman|
|Ronaldo a ´perfect machine´, says Gattuso|
|Barcelona? I can´t say anything - Stuani|
|Silva upbeat about Man City title chances|
|Celtics youngsters say Irving´s callout ´came from a good place´|
|NFL playoffs: Patrick Mahomes v Tom Brady|
|NFL playoffs: Jared Goff v Drew Brees|
|Sixers sign Brewer to 10-day contract|
|Lozano and Morgan scoop CONCACAF awards|
|Lakers ´optimistic´ about LeBron injury|
|Giants produce mammoth fourth quarter against Nymburk|
|Austin FC to join MLS in 2021|
|Henry, Vieira look forward to reunion when Monaco host Nice|
|Barcelona reject Neymar phone call reports|
|Wentz is the quarterback ´going forward´, says Eagles coach Pederson|
|Gattuso: Higuain has not asked to leave|
|Drew Brees by the Opta numbers: 10 facts for QB´s milestone birthday|
|Harry Kane injury: England captain´s history of ankle woe|
|Harry Kane injury: Opta numbers suggest Spurs struggles|
|Harry Kane injury: Tottenham´s options in striker´s absence|
|Allegri: Supercoppa clash practice for Champions League knockouts|
|First in clean sheets, second to Schmeichel in titles – Cech´s Premier League career in Opta numbers|
|Warrington sign England star Widdop|
|Gatland confident Wales can win Six Nations|
|Fulham sign Netherlands international Babel|
|Harry Kane injury: Games the Tottenham striker will miss|
|Simeone focused on matches, not transfer dealings|
|Iran v Iraq: Pressure off for Queiroz & Katanec|
|Vietnam v Yemen: Kocian keeps the faith|
|Darren Bravo back in West Indies Test side for first time since 2016|
|Kane out until March with ankle injury|
|South Korea v China: Son arrives for Group C dead rubber|
|Kyrgyzstan v Philippines: Eriksson remains hopeful|
|McGrath to miss Six Nations, Sexton nearing fitness|
|Kohli savours Dhoni ´classic´|
|Ford: People obsess over Farrell fly-half battle|
|EFL asks Leeds to explain ´spygate´ scandal|
|No alarms for Djokovic and Zverev, Raonic masters Kyrgios|
|Australia 3 Syria 2: Rogic breaks hearts with stoppage-time winner|
|Palestine 0 Jordan 0: Socceroos winner keeps hopes alive for Lions of Canaan|
|Halep: The results don´t matter any more|
|Hard work for Halep as Serena and Osaka sail through|
|Napoli director to take legal action over ´false´ quotes about Rog move|
|Alexander-Arnold facing absence of up to four weeks|
|Solari: We only have one number nine at Real Madrid|
|Halfpenny & Young named in Wales´ Six Nations squad|
|Crawford v Khan confirmed for April 20|
|Centurion Kohli inspires India to level ODI series|
|Wagner hails Huddersfield togetherness after exit|
|Hughes to join Bristol, Le Roux also leaving Wasps|
|ICC appoints Sawhney as new CEO|
|Forest appoint club legend O´Neill as new manager|
|Halep digs deep to gain revenge over Kanepi|
|Cech to retire at the end of the season|
|Brisbane Roar 0 Melbourne Victory 5: Barbarouses treble sinks Roar|