Akila Dananjaya bowled Sri Lanka to a consolation victory in the fifth and final ODI at Colombo, as South Africa's frailties against the turning ball came back to haunt them.
VIEW MATCH CENTRE
A brilliant run-a-ball 97* from captain Angelo Mathews had taken Sri Lanka to 299/8 and the Proteas were never in the hunt as they were skittled for 121, losing by 178 runs.
Dananjaya, the right-arm mystery spinner, was the chief architect of their demise, tying the South African batsmen in knots as he returned career-best ODI figures of 6/29 to leave the final series scoreline 3-2 in the tourists' favour.
Suranga Lakmal set the ball rolling for Sri Lanka, clean bowling Hashim Amla for a four-ball duck in the first over of South Africa's reply with a peach of a delivery. There was no blame attached to Amla who was bamboozled by a ball that swung in before seaming away off the pitch and knocking back his off stump.
Then it was over to Dananjaya who was entrusted with the new ball by his skipper. Aiden Markram had eased to 20 off 13 balls but paid the price after failing to read the googly and miscued a drive straight back to the bowler.
The 24-year-old spinner immediately made it two in two, Reeze Hendricks again not spotting the googly and being bowled between bat and pad for a golden duck. Dananjaya's third wicket in the space of eight deliveries effectively settled the contest, trapping Heinrich Klaasen lbw with yet another wrong 'un to leave South Africa 39/4 in in the eighth over.
JP Duminy kept Quinton de Kock (54 off 57) company in a fifth-wicket stand of 46 until he was caught and bowled by Dhananjaya de Silva and sent on his way for 12 and then Willem Mulder, dismissed lbw for 2 by the pacy Lahiru Kumara, swiftly followed.
Dananjaya returned to the attack to clean bowl key man and stand-in captain de Kock with another exceptional delivery shortly after he had reached his half-century, and then made it five by finding Andile Phehlukwayo's edge.
Not quite finished, Dananjaya took his sixth when Keshav Maharaj heaved him to Lakmal at mid-off and Kumara completed proceedings, as Junior Dala slapped the ball straight to point to complete the innings in just 22.5 overs.
The hosts had Mathews to thank for posting a total which was above-par on a testing pitch.
Niroshan Dickwella (43 off 65) and Upul Tharanga (19 off 18) had given Sri Lanka a positive start before the latter fell to Dala, edging behind to de Kock.
When Kusal Perera gave Klaasen an easy catch at cover point to give Mulder (2/59) his first wicket and South Africa their second in consecutive overs, the visitors had an opening. But Kusal Mendis (38 off 43) kept the Sri Lankans ticking before Mathews took charge in the second half of the innings.
Cameos from de Silva (30) and Dasun Shanaka (21) proved vital in taking Sri Lanka to the brink of 300 and the brilliance of Dananjaya with the ball ensured it was more than enough.