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.
|This is a partnership - Rodgers on contract negotiations with Packers|
|Eagles QB Wentz unsure he´ll be cleared to play opener|
|Balotelli staying at Nice|
|It wasn´t a penalty, says Hodgson as Palace boss fumes at refereeing decisions|
|Salah can play much better - Klopp demands more from Liverpool star|
|Gasly to Red Bull: Vettel, Verstappen and the drivers who took their Toro Rosso chance|
|Klopp in the dark on Karius future amid links to Besiktas|
|Simeone pleased with draw after rigours of Super Cup|
|Captain Reus saves Dortmund in DFB-Pokal|
|I couldn´t care less - Klopp rejects title challenge talk|
|Ailing Bairstow keen to aid England´s unlikely victory bid at Trent Bridge|
|Redskins secure Peterson signing|
|Manchester City goalkeeper Bravo suffers ruptured Achilles|
|Crystal Palace 0 Liverpool 2: Milner and Mane secure victory at Selhurst Park|
|Whyte takes aim at ´coward´ Fury ahead of Wilder showdown|
|Jets delighted with Darnold, open to trading Bridgewater|
|Gasly to replace Ricciardo at Red Bull|
|Valencia 1 Atletico Madrid 1: Rodrigo strikes to deny Simeone´s side|
|Injured Halep withdraws from Connecticut Open|
|Cipriani fined £2,000 by Gloucester|
|Mourinho will be sacked before Christmas, says Sharpe|
|England face record chase after Kohli smashes India to huge lead|
|Ozil captaining Arsenal a miracle - Hoeness|
|Japan players apologise for ´thoughtless, careless´ actions at Asian Games|
|Henry wants Bordeaux job, Wenger confirms|
|Pogba too inconsistent and not a leader, claims Scholes|
|PCB chairman Sethi resigns in letter to Pakistan prime minister Imran Khan|
|US Open comes too soon for Tsonga|
|Unpredictable results making 2018 F1 season a classic - Wolff|
|Mendy restricts phone use on Guardiola advice|
|Modric brands Inter approach claim ´the greatest nonsense in history´|
|Runners and Ryders: Olesen leapfrogs Poulter into last Team Europe berth|
|Kenedy escapes further action over Camarasa kick|
|England´s Bairstow suffers ´small fracture´ to finger|
|Gonalons joins Sevilla on loan from Roma|
|Modric, Ronaldo and Salah final UEFA Player of the Year nominees|
|Tottenham to play opening Champions League home match at Wembley|
|Karius´ Champions League blunders did not lead to Alisson signing - Klopp|
|Leeds considered €20m Conte offer before turning to Bielsa|
|Modric, Rakitic lead new era for World Cup finalists Croatia|
|Storm´s Chambers banned for three weeks, Smith injury not serious|
|Porte to race Vuelta after recovering from Tour crash|
|The Career Golden Masters: A run-down of Djokovic´s magnificent record|
|Japan send home four basketball players from Asian Games amid prostitution scandal|
|Rugby tackle bags helping Liverpool´s Alisson with Premier League life|
|Federer raring to go at US Open after Djokovic defeat|
|Chelsea boss Sarri plans to give up smoking|
|Alonso´s Toyota team stripped of Silverstone victory|
|Ceballos: No issue with former Real Madrid boss Zidane|
|MLS Review: Martinez equals single-season goalscoring record|
|Astros avoid sweep with win over Athletics|
|Seppi advances, Paire exits Winston-Salem|
|Bale feeling good as Madrid eye sweep of trophies|
|You can´t leave a house three-quarters built – Neville urges United to back Mourinho|
|Dodgers slugger Machado leaves game after being struck by pitch|
|Harden says Carmelo will ´be a good fit´ for Rockets|
|Morata: I never considered Chelsea exit|
|Gavrilova kicks off title defence in New Haven|
|Lopetegui pleased with Bale and Real Madrid after LaLiga opener|
|It´s a very special moment – Djokovic revels in Golden Masters achievement|
|Sorrentino thanks Ronaldo for support after injury|
|Twins place Santana on DL with finger injury|
|Yankees´ Gregorius suffers ´pretty significant´ heel bruise|
|Snedeker ends PGA Tour drought with Wyndham Championship win|
|Spalletti unconcerned despite Inter´s underwhelming start|
|Djokovic makes history with Masters clean sweep in Cincinnati|
|Real Madrid 2 Getafe 0: Bale gives Lopetegui first LaLiga win|
|IndyCar driver Wickens taken to hospital after crash|
|Sherman calls for NFL to scrap ´idiotic´ helmet rule|
|Sassuolo 1 Inter 0: New-look Nerazzurri given early reality check|