South Africa won the toss and made immediate inroads as Dimuth Karunaratne was out first ball, unable to lower his hands to a lifting delivery from Kagiso Rabada and sending a looping catch to second slip.
Avishka Fernando displayed similar carefree abandon as he had in the shock win over England last week, upping the scoring rate amid some loose strokes in a 67-run stand alongside Kusal Perera.
Fernando departed for 30 from 29 balls off the bowling off Pretorius, who had his second wicket in his next over when Perera chopped on, having also contributed 30.
The Lankans never managed to get the runs flowing after the two early blows. Angelo Mathews failed to keep a Chris Morris out and lost his wickets.
Kusal Mendis’s stay too was excruciating but Sri Lanka needed someone to hold one end up. The disappointing bit, however, was that he wasn’t able to convert his knock into something substantial.
A short ball from Pretorius was horrendously mistimed to cover-point as Sri Lanka lost their top five with just 111 on the board.
More recklessness followed as Dhananjaya de Silva failed to connect his reverse sweep and was bowled by JP Duminy while Jeevan Mendis was bounced out.
The sustained pressure meant there was no Thisara Perera special as the side continued to huff and puff and finally could muster 203 before bwing bowled out.
Chasing 204 for win, Quinton de Kock and Amla rushed off the blocks to ease the early nerves of the chase.
De Kock, though, fell prey to a perfect Malinga yorker that swung in and took out the leg stump. It was a breeze for South Africa with both Amla and du Plessis happy to play risk-free cricket.
Amla reached his half-century first, off 56 deliveries, and then saw his captain go past the landmark in the 28th over off 74 deliveries.
Sri Lanka were already on the backfoot and then saw the door being smashed on their face as Faf du Plessis and Hashim Amla stitched a 175-run stand.
South Africa eased past Sri Lanka to register a nine-wicket win. Dwaine Pretorius picked up the man of the match award.
For Sri Lanka, qualification would now require two wins from their remaining games plus a collective collapse from England, Pakistan and Bangladesh ahead of them.
For South Africa, there will only be regret that a display of this sort could not have been conjured earlier on when it truly mattered.
Sri Lanka 204 (49.3 overs): K Perera 30, Avishka 30; Pretorius 3-25
South Africa 206-1 (37.2 overs): Amla 80*, Du Plessis 96*