In a rain-truncated game reduced to 39 overs Sri Lanka came up with their best batting performance of the series to run up an impressive score of 306 for seven wickets after being invited to bat first.
South Africa’s run chase was interrupted by bad weather and when they resumed play they were asked to chase a revised target of 191 in 21 overs. They were off to a blazing start with Quinton de Kock (23) and Hashim Amla (40) putting on 34 for the first wicket off three overs. The momentum was maintained by Jean-Paul Duminy and as long as he was at the wicket South Africa fancied their chances. At one stage they looked like walking away with the match when they were 129-3 at the start of the 13th over with Duminy that great finisher going great guns.
But Dasun Shanaka gave Sri Lanka that slight edge when he ran out Duminy for 38 with a direct hit from mid-off to make South Africa 130-5 in 13 overs. There was still the dangerous David Miller to contend with but strangely he was off colour as Sri Lanka kept on chipping away with wickets at the other end.
When the final over began South Africa required eight runs to win but Suranga Lakmal bowling the crucial over took the vital wicket of Miller who was bowled off an inside edge as he attempted to hit across the line for 21 and suddenly South Africa were nine down for 183.
The task proved too big for the last pair Junior Dala and Lungi Ngidi who could manage only four between them as Lakmal bowled a tight and tidy over to end the match to give their captain Mathews a memorable 200th ODI appearance. South Africa finished on 187-9.
Sri Lanka were given a solid platform by openers Niroshan Dickwella (34) and Upul Tharanga (36) who put on 61 off 69 balls.
Following their dismissals the tempo was maintained by Kusal Perera who raced to an aggressive half century (51) off 32 balls with the aid of six fours and two sixes. Perera figured in a 59-run stand with his Mathews who made 22.