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.
|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|
|Australia desperately need Smith and Warner back - Warne|
|Draxler warns Germany: Mbappe has 300 hp!|
|Draymond Green says Warriors will have to ´bring it´ every night in the West|
|England´s ´wonderful bravery´ leaves Southgate excited for the future|
|Jayasuriya: I always conduct myself with integrity and transparency|
|Northern Ireland stars hurt by lack of club football, says O´Neill|
|Rodgers inspires late Packers comeback|
|Brewers blank Dodgers to take 2-1 NLCS lead|
|Cavaliers, Nance agree to four-year extension|
|Ramos wants Spain to believe in Luis Enrique´s team|
|De Laurentiis: I´ve spoken to Genoa and agent about Piatek|
|Kaka tips bright future for Paqueta after Milan agreement|
|Suns star Booker set to return for season opener|
|Warriors coach Kerr not expecting fast start from NBA champs|
|Fultz to start for 76ers as Brown eyes NBA Finals|
|Maltese champions Valletta want Usain Bolt|
|It would have been normal to kill them! Luis Enrique slams abysmal Spain|
|Seahawks, Trail Blazers owner Paul Allen dies aged 65|
|Red Sox ace Sale released from hospital, still set for game five|
|Beer-throwing fan banned by Patriots|
|Southgate lauds ´tremendous´ attackers after famous Spain win|
|Djokovic closing in on summit as he scales new heights|
|Monaco the natural move for Henry - Martinez|
|Ending England drought a ´beautiful feeling´ – Sterling|
|Halep to face Pavlyuchenkova in Moscow comeback|
|NBA 2018-19: Five non-LeBron James storylines to follow|
|Spain 2 England 3: Kane inspires Three Lions as Sterling ends drought in style|
|Bosnia-Herzegovina 2 Northern Ireland 0: Dzeko double leaves O´Neill´s side on the brink|
|Mannarino stops the rot in Moscow|
|Neymar pleased Brazil will not face Messi in Argentina clash|
|Buccaneers fire defensive coordinator Mike Smith after loss to Falcons|
|´Surprised´ Deschamps accepts he could´ve made more effort with Koscielny|
|Kuwait 0 Australia 4: Socceroos deliver win for new coach Arnold|
|Van Dijk fit for Liverpool return - Koeman|
|NBA 2018-19: Eastern Conference predictions|
|NBA 2018-19: Five rookies to watch|
|Denly replaces injured Dawson in England ODI squad|
|Low confirms under-fire Neuer to start against France|
|NBA 2018-19: Western Conference predictions|
|Bolt offered two-year deal by European club, says agent|
|NBA 2018-19: LeBron the Laker - what it means|
|Griezmann ahead of Mbappe for Ballon d´Or - Modric|
|Billy Vunipola ruled out with fractured arm|
|Get the chequebook out! - Mayweather talks up potential Khabib clash|