Kagiso Rabada rattled the Sri Lankan top-order with pace and chinaman Tabraiz Shamsi polished off the tail as South Africa made a solid start to the ODI series by registering a six wicket-win in Dambulla after being outplayed in the Test series.


Rabada and Shamsi claimed four wickets each to help bowl out Sri Lanka for 193, a total the visitors passed in just 31 overs to take a 1-0 lead in the five-match series.


South Africa's chase depended on an 86-run third-wicket stand between Quinton de Kock and skipper Faf du Plessis, who both hit 47.


Off-spinner Akila Dananjaya struck at crucial moments to get three wickets but Jean-Paul Duminy ensured a swift chase with his 32-ball unbeaten 53.


But it was a superb opening pace spell from Rabada and Shamsi's career-best figures of 4-33 with his left-arm wrist spin that led South Africa to their first victory on tour after being swept aside in a two-Test series.


Sri Lanka's innings lasted just 34.3 overs but batsman Kusal Perera hit a gritty 81 to lift the hosts from a precarious 36-5 following their decision to bat first.


Kusal, whose 72-ball stay included seven fours and a six, put on a crucial 92-run sixth-wicket stand with Thisara Perera, who made 49 to give the team total some respect.


Kusal and Thisara counter-attacked to hit the South African bowlers to all parts of the ground as Sri Lanka reached 100 in the 16th over.


The left-handed batting duo cashed in on the inexperience of rookie pacemen Willem Mulder and Andile Phehlukwayo as they plundered runs.


But the introduction of spin in the 18th over put Sri Lanka in trouble again. Shamsi broke the dangerous partnership by getting Thisara caught behind.


Kusal kept up the good work to get his fourth ODI fifty and got support from Akila Dananjaya with a 38-run partnership.


He finally fell to Shamsi after attempting a reverse sweep to get caught at point and the innings folded soon after.


South Africa had a wobbly start to their chase after opener Hashim Amla and Aiden Markram fell to the guile of Dananjaya, who opened the attack for the hosts.


The left-right batting combination of de Kock and du Plessis blunted Sri Lanka's spin threat with their measured approach.


However, de Kock and du Plessis were denied their fifties after Dananjaya and left-arm spinner Lakshan Sandakan got the batsmen out respectively.


Duminy, who hit six fours and two sixes, kept calm to complete his 26th ODI half-century and the veteran left-hand batsman hit the winning runs.


The second ODI, a day-night game, is slated for Wednesday in Dambulla. The two sides will also play a one-off Twenty20 international on August 14.