Sri Lanka 299 for 7 (Mathews 97*, Mulder 2-59, Phehlukwayo 2-60) beat South Africa 121 (de Kock 54, Akila 6-29, Kumara 2-34) by 178 runs
Colombo: Sri Lanka's Akila Dananjaya spun a web around South Africa's batsmen with a six-wicket haul to help the hosts to a commanding 178-run victory in the fifth and final one-day international on Sunday.
Sri Lanka captain Angelo Mathews struck a run-a-ball 97 to anchor his side to an imposing 299 for eight after the hosts won the toss and opted to bat.
South Africa, who had won the first three matches of the series, appeared clueless against off-spinner Dananjaya's bag of tricks and were bundled out for 121 under 25 overs.
The 24-year-old took 6-29 to register his best bowling figures in one-dayers and helped Sri Lanka finish the series with a respectable 3-2 result.
South Africa's stand-in skipper Quinton de Kock, leading the side for the injured Faf du Plessis, was the only batsman to provide some resistance for the touring side with a stroke-filled 54.
Earlier, Mathews hit 11 fours and a six in his knock as Sri Lanka scored 93 off their final 10 overs to set South Africa a 300-run target.
Opener Niroshan Dickwella scored 43, as Sri Lanka made South Africa toil on the Colombo pitch after winning the toss and electing to bat.
Pace bowlers Andile Phehlukwayo and Willem Mulder each took two wickets for South Africa, who have a winning 3-1 lead in the series.