Centuries from Quinton de Kock and AB de Villiers earned South Africa a first one-day international series win in Sri Lanka as they sealed victory in the third match at Hambantota by 82 runs.
De Kock made 128 and de Villiers an explosive 108, putting on 116 for the third wicket, as the Proteas posted an imposing total of 339 for five.
And it proved too much for Sri Lanka as Ryan McLaren's three wickets helped dismiss them for 257.
Hashim Amla and De Kock got the tourists off to a flying start and had already taken the hosts to 118 by the time Rangana Herath made the breakthrough to remove Amla for 48.
He struck again to trap Jacques Kallis lbw for just four, but it only brought de Villiers to the crease.
De Kock, who was dropped on 37 by Ashan Priyanjan, hit 12 fours and three sixes in his 127-ball knock before falling to Sachithra Senanayake, caught at mid-on by Ajantha Mendis, with his team on 248.
De Villiers turned up the power with JP Duminy at the crease and the pair put on 80 in eight overs. The former brought up his 17th ODI ton in 66 balls and smashed 11 fours and four sixes before he holed out to Priyanjan at deep-cover off Mendis.
Sri Lanka's top three all got starts, but were unable to go on.
Kusal Perera made 37, Tillakaratne Dilshan 30 and Kumar Sangakkara 36 as the Proteas took wickets at steady intervals to turn up the pressure.
Sangakkara was McLaren's first victim, wicketkeeper De Kock taking the catch down leg side, before Mahela Jayawardene was dismissed for just two.
A battling 58 from captain Angelo Mathews briefly held up the South Africa charge, until McLaren sent him packing.
McLaren's third wicket was Priyanjan for 30, with the hosts eventually skittled out inside 45 overs.