The Lankans‚ who needed 488 to win‚ were dismissed for 281 after 70 minutes’ play to make South Africa the victors by 206 runs.
Sr Lanka resumed on 240/5 and their captain‚ Angelo Mathews‚ loomed as their last hope of prolonging the inevitable.
But he added just a single to his overnight score of 58 before he was trapped in front by Kyle Abbott with the 14th ball of the day.
Abbott struck again in the same way four overs later to remove Dhananjaya de Silva for 22.
Four balls after that Vernon Philander dived to take a fine return catch that ended Rangana Herath’s innings.
Dushmantha Chameera went next‚ left with nothing to do but edge a short‚ rising delivery from Kagiso Rabada to wicketkeeper Quinton de Kock.
Keshav Maharaj ended the match by cleanbowling Nuwan Pradeep.
Rabada and Maharaj shared six wickets.
The series resumes at Newlands on Monday.