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.
|LaLiga 2018-19: Bale or Griezmann - Who will step into Ronaldo´s breach as Messi´s main rival?|
|Woods winning 15th major would be greatest comeback in sport – Faldo|
|Retiring Storm great Hoffman not giving up on Finals dream|
|Folau won´t change aerial approach in All Blacks showdown|
|Racism behind Sterling criticism, says ex-Arsenal star Wright|
|Eto´o joins Qatar SC following Ligue 1 links|
|UEFA Super Cup 2018-19: Atletico academy eclipsing Madrid, La Masia|
|UEFA Super Cup 2018-19: Should Real Madrid cash in on Modric?|
|Scintillating Serena sends warning, Azarenka survives opener|
|DeGrom strikes out 12, Mets hit 5 homers in win over Yankees|
|Djokovic needs nine MPs as Murray crashes out|
|Murray unsure of US Open readiness after Cincinnati exit|
|Van Dijk: Alisson making difference at Liverpool|
|Johnson saves eight MPs but Djokovic prevails|
|Federer anxious ahead of Cincinnati comeback|
|Tevez relishing Messi reunion|
|Ronaldo arrival has taken Juve forward in Europe – Nedved|
|Serena steamrolls Gavrilova in Cincinnati return|
|Packers QB Rodgers doesn´t regret criticising team-mates|
|Indians OF Martin recovering from life-threatening bacterial infection|
|Shoulder injury sends Royals starter Duffy to DL|
|Yankees place Sabathia on DL with right knee inflammation|
|Aubameyang urges Emery to capitalise on his ´spark´ with Lacazette|
|Anderson can play until he´s 40, says Bayliss|
|Keita living childhood dream after securing Inter switch|
|49ers to sign veteran RB Alfred Morris, Kyle Shanahan says|
|Arnaiz leaves Barcelona for Leganes in €5m deal|
|Tottenham´s move to new stadium delayed|
|Roosters-bound Hall suffers ACL injury|
|Murray suffers Cincinnati defeat to Pouille|
|No Cech mate - Arsenal goalkeeper hits back at Bayer Leverkusen|
|Halep first to seal WTA Finals spot|
|Veteran Carmelo Anthony pens one-year Rockets deal|
|Runners and Ryders: Poulter closes in on Team Europe spot|
|Gameiro presented by Valencia after departing Atletico Madrid|
|World Cup winner Kimpembe extends PSG contract to 2023|
|AC Milan send Locatelli on loan to Sassuolo|
|South Africa´s Etzebeth set for return from injury|
|Rafinha ´very likely´ to stay at Barcelona|
|No dual Ryder Cup role should Woods make USA team, says Furyk|
|Inter complete Keita deal|
|David Silva announces retirement from international football|
|Modric in Real Madrid´s UEFA Super Cup squad amid Inter links|
|Neville hopes Shaw is on to something special after first United goal|
|Unchanged England waiting on Stokes verdict|
|Yates brothers to race Vuelta together|
|Kalinic explains why he rejected World Cup medal|
|Furyk excited to see Woods´ return to form|
|Liverpool ignoring media´s champions chat, says Van Dijk|
|Suspended Smith replaces Kohli as top-ranked Test batsman|
|Tiger fanfare inevitable but it´s time to recognise Koepka as the star he is|
|Dier: Tottenham will shut up transfer critics|
|Fernandes leaves West Ham for Fiorentina on loan|
|´No chance´ Willian would have stayed at Chelsea under Conte|
|Vettel confident he can catch Hamilton|
|Cane dismisses talk of All Blacks limiting haka|
|Zaha promises Palace commitment as contract talks continue|
|Real Madrid defender Odriozola to miss UEFA Super Cup|
|All Blacks wary of Pocock threat|
|Bayern Munich confirm no ligament damage for Alaba|
|Nicklaus hails Koepka´s great year after US PGA triumph|
|Keita ready to ´explode´ at Inter|
|Halep: Stephens makes me a better player|
|Manchester United loan Wilson to Aberdeen|
|Beale backs Hodge to start in Rugby Championship opener|
|Bakayoko arrives for AC Milan medical|
|Australia favourites for Rugby Championship opener, says Hansen|
|Muller hails Lewandowski: That´s why Bayern won´t let him go|
|Allegri eyes Champions League after watching Ronaldo score first Juventus goal|
|LaLiga 2018-19: Barcelona or Real Madrid - whose close-season transfers have been better?|