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.
|Klaassen: Impossible to compare me to Kroos, Xavi|
|Guardiola eyeing future international job|
|Trubisky doubtful for Bears´ Thanksgiving game|
|O´Neill planning ´next adventure´ after leaving Republic of Ireland|
|Premier League: Brexit should not be used to weaken squads|
|16 balls, 14 boundaries, 74 runs - Shahzad steals show in T10 opener|
|WATCH: Patrice Evra plays with poultry in bizarre Thanksgiving message|
|Packers star Rodgers pledges $1m to California wildfire relief|
|Klitschko worried for boxing´s Olympic future|
|Lewandowski back in Bayern training as Davies joins new team-mates|
|Hogg fit for much-changed Scotland|
|Former Arsenal striker Bendtner faces 50 days in prison over taxi driver assault|
|Athletic extend Muniain contract to 2024|
|Kohli ready to move on after narrow defeat|
|PSG to wait for Neymar, Mbappe injury updates|
|Icardi hopeful of Messi return for Copa America|
|Cavs star Love expects to be out until 2019|
|Ricciardo terrified by Renault switch|
|Under-fire Taylor calls for PFA structure review|
|McLaren reveal one-off livery for Alonso´s last race|
|Samir Nasri training with West Ham amid reports of free transfer|
|Guardiola warned over derby clash comments|
|Stoinis sees Australia to T20 win against India|
|Modric not deserving of Ballon d´Or – Cavani|
|F1 Raceweek: Alonso ends on 312 races, Raikkonen a Ferrari great - Abu Dhabi GP in numbers|
|Neymar made a mistake leaving Barcelona for PSG, insists Edmilson|
|O´Neill and Keane leave Republic of Ireland after relegation|
|WATCH: Maxwell hits Spidercam with sliced shot in Australia-India T20|
|Rafinha wants Barca exit due to ´crazy´ Valverde selections – Mazinho|
|France to wear rainbow laces in support of Thomas following attack|
|You need to stop this – Cavani slams media over supposed Neymar feud|
|Anderson rested for final Test|
|Tite applauds Seedorf for Cameroon´s style of play|
|Griezmann not obsessed with Ballon d´Or|
|Neymar feels injury is ´nothing serious´|
|Durant says Green altercation won´t impact his free agency|
|Morris blasts drama surrounding Wizards: It´s messed up|
|Scaloni thrilled for Dybala, Icardi|
|Green´s last-second shot keeps Raptors atop East standings|
|Deschamps praises Griezmann for Giroud gesture|
|Warriors star Curry improving, still out at least three more games|
|Chile 4 Honduras 1: Sanchez, Vidal shine for La Roja|
|Argentina 2 Mexico 0: Icardi, Dybala score first international goals|
|Mickelson calls Tiger the greatest of all time|
|Durant fined $25,000 for using inappropriate language|
|Fizdale isn´t concerned about Knicks´ losing streak|
|No particular concern for Mbappe – Deschamps|
|PSG team-mate Choupo-Moting hopes Neymar injury is not serious|
|McLeish marvels at stylish Scotland´s promotion success|
|Draw proves Poland can play well without Lewandowski – Brzeczek|
|Giggs: Wales let themselves down|
|Sarachan ´moved USA forward´ in interim spell|
|Mickelson lays $200,000 bet with Woods for first hole|
|Dolphins QB Tannehill to start against Colts|
|Murcia edge out Banvit, Bonn crush Opava|
|Neymar injury not serious, says doctor|
|Mancini: Italy ahead of schedule|
|France 1 Uruguay 0: Giroud hits the spot after Mbappe injury blow|
|Portugal 1 Poland 1: Milik penalty salvages precious point as Danilo sees red|
|Italy 1 United States 0: Politano snatches late winner for Mancini´s men|
|Scotland 3 Israel 2: Forrest hat-trick seals Nations League promotion|
|Brazil 1 Cameroon 0: Richarlison fills Neymar´s boots as skipper suffers injury|
|France & PSG star Mbappe suffers shoulder injury|
|Albania 1 Wales 0: Gunter´s night spoiled by Balaj|
|Leeds and Manchester United to meet in friendly|
|Outspoken Smith leaves Cavaliers|
|PSG star Neymar injured for Brazil|
|Juventus midfielder Can back in training after surgery|
|Rams-Chiefs rollercoaster was the NFL´s modern-day masterpiece|
|Ronaldo an AC Milan target in 2017, confirms Fassone|