Rookie seam bowlers Wiaan Mulder and Lutho Sipamla took two wickets each as South Africa bowled injury-hit Sri Lanka out for 180, to complete a handsome victory by an innings and 45 runs, on day four of the first test at Centurion Park.
The tourists resumed their second innings on 65/2 on a wicket that provided plenty of assistance for the seam bowlers and when dangerous opener Kusal Perera was out for 64, their hopes of saving the test were realistically over.
Sri Lanka had suffered crippling injuries to their bowling attack, and were also without middle-order batsman Dhananjaya de Silva for the second innings - a major concern for their home series against England that starts on January 14.
The tourists posted an impressive 396 in their first innings, but allowed South Africa to amass 621 in reply, and will need to find more potency with the ball ahead of the second test that starts in Johannesburg on January 3.
"A test match is never easy and it has been a year since we won one, so it feels good," South Africa captain Quinton de Kock said at the post-match presentation.
"To finish how we did is very pleasing. There were a lot of demons in the wicket.
"Day one we were disappointed with our bowling performance, but we came back towards the end and then came out with the bat and showed some great character.
"Our planning was really good and that is what we will take forward to the second test."
All-rounder Mulder (2/39) showed in Sri Lanka's first turn at bat that he was able to get movement off the wicket with his gentle medium pace, and created several chances on the fourth morning before he finally got reward.
An in-swinging delivery saw Dinesh Chandimal bowled for 25, before Niroshan Dickwella edged to wicketkeeper Quinton de Kock (10).
When Anrich Nortje (2/47) induced an edge from the blazing bat of opener Perera, the game was effectively up for the visitors with their score 114/5.
Dasun Shanaka (6) became the sixth wicket in the test for debutant seamer Lutho Sipamla (2/24) as he also provided a catch for De Kock, and Vishwa Fernando was run out on the stroke of lunch.
South Africa bowled part-time spinner Aiden Markram after the interval in tandem with Keshav Maharaj in a bid to raise their slow over-rate and avoid a sanction from the International Cricket Council, but it lowered the intensity of their attack.
That allowed Sri Lanka's debutant all-rounder Wanindu Hasaranga to rack up a maiden test half-century in only 46 balls, before he was caught in the deep off Sipamla for an excellent 59.
"We were in the driving seat scoring almost 400 runs (in the first innings), but we lost bowlers to injury and that is why it ended up like this," Sri Lanka captain Dimuth Karunaratne said.
"As a batting unit, I am happy. I hope the young fast bowlers can do the job for me in the second test.
"We will need a positive mindset."