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.
|Vinicius ´calm´ as he waits for Real Madrid chance|
|Nothing else to say - Ramos posts clip of supposed Sterling stamp|
|Chiellini joins Mind the Gap campaign to help players prepare for retirement|
|Injured Kusal Perera replaced by Kusal Mendis in Sri Lanka squad|
|Big names return for Scotland´s November Tests|
|Essien tells Loftus-Cheek to stay and fight for Chelsea chance|
|Nainggolan relishing challenge of first Milan derby|
|Curry: Slap me if I tire of championship celebrations|
|Sevilla don´t fear Messi or Barca – Kjaer|
|Low: Dropped Muller is still very important for Germany|
|Hayward put ´dark memories´ behind him with Celtics return|
|I hope I´m in Klopp´s good books! - Koeman jokes after resting Wijnaldum|
|Rested Fellaini should be fit for Manchester United, says Martinez|
|France´s mentality must be right - Lloris|
|Bellinger seals dramatic win as Dodgers level up NLCS|
|Curry, Durant lead Warriors past Thunder|
|Kjaer surprised by LaLiga-leading Sevilla as Machin´s men remain grounded|
|A-League preview: Honda the big arrival as fascinating season awaits|
|Mexico 0 Chile 1: Sanchez helps La Roja to late win|
|Celtics too good for 76ers in NBA opener|
|United States 1 Peru 1: Flores salvages late draw for visitors|
|Martinez not worried about Belgium depth|
|Red Sox move ahead of Astros in ALCS|
|Depay ´a joy to watch´, says Koeman|
|Timberwolves owner looking to trade Butler, backs Thibodeau|
|Shepard says Giants have ´total faith´ in Manning|
|Hazard is out of this world – De Ligt enjoys Belgium test|
|Tite: Brazil were better than Argentina|
|Foley eyes World Cup after re-signing with Wallabies, Waratahs|
|Low slams decisive France penalty call|
|I fined him for his goal at Old Trafford! Giggs delighted for Wales hero Wilson|
|Matuidi lauds Deschamps´ tactical nous after Germany win|
|Scaloni excited by Argentina despite Brazil loss|
|Tsonga back in business, Dzumhur dumped out in Moscow|
|Germany suffer six defeats in a year for first time|
|Many clubs have asked about Piatek - agent|
|Bartomeu: Barca open to defensive reinforcements after Vermaelen injury|
|Bonn spoil PAOK´s landmark European game|
|Konta conquers Mertens in Moscow|
|Republic of Ireland 0 Wales 1: Wilson stunner moves Giggs´ side top|
|France 2 Germany 1: Griezmann delivers Low blow as Les Bleus reign in Paris|
|Belgium 1 Netherlands 1: Groeneveld cancels out Mertens strike|
|Argentina 0 Brazil 1: Miranda heads late winner after rivalry fails to ignite|
|Messi would struggle in this Manchester United team – Scholes|
|Falcons place Devonta Freeman on injured reserve|
|Westbrook ruled out of Thunder opener|
|Wilder´s team open to Joshua talks|
|Brentford appoint Thomas Frank as new head coach|
|England´s perfect performance sets the standard - Trippier|
|Odell Beckham Jr. needs to create headlines on the field, says Giants owner|
|Robshaw joins list of England absentees|
|Chile need goals from Sanchez despite United form - Rueda|
|Modric reveals Ronaldo respect, ´will never play with´ Messi|
|Osaka can be one of the greats, says coach Sascha Bajin|
|Liverpool´s Naby Keita carried off injured in Guinea match|
|Duminy to miss Australia tour for shoulder surgery|
|F1 Raceweek: Ferrari ready to ´challenge the impossible´ as Hamilton nears title|
|Umesh replaces injured Thakur in ODI squad|
|IAAF delay implementation of testosterone ruling amid Semenya challenge|
|Fakhar and Sarfraz lead Pakistan recovery after Lyon blitz|
|Japan see off Uruguay in seven-goal thriller|
|Arda Turan given huge fine by Istanbul Basaksehir after alleged brawl with singer|
|Busquets no better or worse than Dier – does Opta data back up Allardyce claim?|
|United boss Mourinho charged for alleged post-match comments by FA|
|Halep withdraws from Kremlin Cup ahead of WTA Finals|
|Renato Sanches eager for further Bayern Munich minutes|
|Nations League standings: Promotion, relegation and race for finals|
|Windies coach Law banned for ´inappropriate comments´ in India Test|
|Carrick denies Manchester United stars are ´not trying´|
|Ferrari struggling under pressure of chasing Mercedes, says Massa|