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.
|Steelers stay ahead as Patriots lose AFC´s second seed|
|Lionel Messi is the best, says Amor|
|I´m still tired just looking at Robertson – Mourinho in awe of Liverpool intensity|
|Casillas takes swipe at Mourinho after United lose to Liverpool|
|Valverde relieved as Messi brilliance prevents another Levante nightmare|
|WATCH: Leno proposes to girlfriend after Bears clinch division title|
|Messi and Suarez the world´s best strike partnership, says Pique|
|Klopp: I cannot keep every Liverpool player happy|
|Messi and Suarez outscoring Real Madrid and Atletico in LaLiga|
|Levante 0 Barcelona 5: Marvellous Messi banishes ghosts of last season|
|Colts rout Cowboys to keep playoff hopes alive|
|Bears shake off Packers to win NFC North and return to playoffs|
|Mourinho explains Pogba omission and defends Lukaku´s Liverpool showing|
|Liverpool´s display against Manchester United one of the best, claims Klopp|
|Look away Jose! Damning stats expose Manchester United´s limp Liverpool loss|
|Time´s up, Mourinho: Manchester United can dither no longer|
|Manchester United´s players are not dishonest – Mourinho|
|Manchester United´s lack of ambition under Mourinho is scary – Keane|
|Mourinho: All Manchester United can achieve is fourth|
|Quagliarella should be protected by UNESCO, jokes Sampdoria coach|
|Manchester United surpass last season´s goals-against tally in first 17 games|
|Hasenhuttl revels in ´unbelievable´ victory over Arsenal|
|Liverpool 3 Manchester United 1: Shaqiri´s late show bails out Alisson as Reds return to the top|
|Edinburgh in control in Champions Cup, Racing win again|
|Emery ponders January signing after Bellerin injury|
|It is only a knock – Sarri plays down Hazard injury fears|
|Redskins QB Alex Smith released from hospital|
|Starc: If I listen to Warne, I may as well retire|
|Curry interviews retired NASA astronaut, apologises for moon comments|
|Hazard refusing to give up on Premier League title hopes|
|Ziyech & Blind score hat-tricks as Ajax claim 8-0 win|
|Canelo v Fielding: What next for three-weight champion Alvarez?|
|Southampton 3 Arsenal 2: Austin and Ings end Gunners´ long unbeaten run|
|Brighton and Hove Albion 1 Chelsea 2: Sensational Hazard proves the difference|
|Pogba on the bench as Clyne starts for Liverpool|
|Lipsky ends long barren spell in Malelane|
|Lakers´ Stephenson to repeat air guitar despite technical|
|Fletcher pushed Miller on to Broncos sack record|
|The Sarri effect: Hazard surpasses 2017-18 goal involvements in just 16 games|
|Van der Burgh retires on a high note with breaststroke double|
|Rashford: Liverpool was never an option|
|No team Liverpool play this season will be as motivated as Man United – Klopp|
|India surprised by contentious Kohli decision - Bumrah|
|The Sunday Seven - 7 Key Opta facts for NFL Week 15|
|Miller eyeing Joshua bout at Madison Square Garden|
|Finch cleared of serious damage after another finger blow|
|Rashford ´untouchable´ because he plays on his limits – Mourinho|
|It´s important to have his mentality - Mayfield thrilled with Kobe Bryant visit as Browns beat Bronc|
|Centurion Latham indebted to ´world-class´ Williamson|
|Spurs´ Dier out until January after appendix removal|
|A-League Review: Glory down Jets to stay unbeaten|
|Philander ruled out of first Test|
|Controversial Kohli dismissal puts Australia in command|
|Thunder´s Westbrook: ´When we defend like that — best team in the league´|
|Kante at his best further forward, reiterates Sarri|
|Rose capitulates in Indonesia to squander chance to top rankings|
|Fielding: The better man won but I lived a dream|
|Rallying Bulls stun Spurs, LeBron and Ball post triple-doubles|
|Latham century puts New Zealand in commanding position|
|Mayfield leads Browns past Broncos|
|Canelo-GGG trilogy? We can make it happen – Alvarez|
|Canelo outclasses Fielding by third-round TKO|
|Farmer retains title prior to Canelo-Fielding bout|
|Qatar unveils Lusail Stadium for 2022 World Cup|
|Lakers pair LeBron, Ball revel in triple-double feat|
|Allegri hails ´great professional´ Ronaldo|
|LeBron, Ball first Lakers team-mates with triple-doubles in same game since 1982|
|Premier League contenders Liverpool ready to win titles – Henderson|
|Hopkins´ two TDs help Texans close in on AFC South title with win over Jets|
|Courtois: Simeone criticises Real Madrid to boost popularity|