Sri Lanka lost the first three matches to the tourists, but two consolation victories have followed to hand Mathews and his side a lift ahead of their Twenty20 meeting on Tuesday.
Mathews hit 11 fours and a sixin an unbeaten knock of 97 off as many balls to carry the hosts to 299-8, before Dananjaya came to the fore with the ball.
The all-rounder posted sensational figures of 6-29 – Sri Lanka’s best in nine years – to do the heavy lifting as the Proteas were all out for a dismal 121, putting a dampener on what had been a successful series.
While Mathews was the star man, Sri Lanka’s innings was steady throughout and included four half-century partnerships.
The first saw openers Upul Tharanga (19) and Niroshan Dickwella (43) get the home side off to a strong start, with the latter soon enjoying a third-wicket stand of 50 with Kusal Mendis.
When Dickwella finally departed to Andile Phehlukwayo (2-60), Mathews arrived in the middle and he stepped up the scoring.
The skipper linked up well with Dhananjaya de Silva (30), before Thisara Perera (13) worked hard to get him on strike for a one-sided partnership of 52.
Mathews stood firm even when Sri Lanka lost two wickets in the final over and no momentum was lost as South Africa endured a wretched start with the bat, losing Hashim Amla for a duck with the fourth ball of the innings.
The Proteas’ stutters initially continued – Reeza Hendricks went for a golden duck – before JP Duminy (12) and Quinton de Kock (54) belatedly provided some stability.
De Silva caught and bowled Duminy, though, and that wicket prompted an incredible passage of threeconsecutive overs in which South Africa lost batsmen – including captain De Kock to Dananjaya.
South Africa scraped to three figures, but Junior Dala was the last man to go from a Lahiru Kumara delivery to cap a dismal day for the visitors. (Courtesy Hindustan Times)