Sri Lanka spun a web around the South African batsmen and shot them out for 167 in the Singer Cup one-day international on Tuesday.
Leg-spinner Upul Chandana grabbed 2-20 from 10 overs and off-spinner Kumar Dharmasena finished with 2-37 as South Africa were bowled out with four balls to spare at the Sinhalese sports club ground.
Jacques Kallis hit an unbeaten 83, but found no assistance at the other end as the tourists collapsed to 110-7 before Nicky Boje led a minor recovery.
Boje made 19 during an eighth-wicket stand of 38 with Kallis, but it came too late after a reckless display by the top-order.
South Africa, playing their 200th one-day, need a win to ensure their place in Friday's final against the hosts at the expense of Pakistan.
A defeat for Shaun Pollock's men will set up a virtual semi-final against Pakistan in the last league match at the same ground on Wednesday.
South Africa, sent to bat, lost their openers by the third over and failed to build on the third-wicket stand of 60 between Andrew Hall and Kallis.
The gamble to open with Lance Klusener backfired as the left-hander was out to the first ball he faced, driving Pramodaya Wickremasinghe straight to cover.
The other opener, Gary Kirsten, was bowled by Nuwan Zoysa in the third over, but Sri Lanka had to wait till the 14th for their next success.
Hall hit 32 off 34 balls when he pulled Dharmsena to square-leg where Mahela Jayawardena picked up the skier.
South Africa slipped from 84-3 to 94-5 as Daryll Cullinan and Jonty Rhodes were run out attempting risky singles against the alert Sri Lankan fielders.
Chandana opened up the tail with the wickets of captain Pollock and his deputy Mark Boucher in the 28th over.
Boucher failed to keep a drive down and was snapped up by Jayawardena in the covers. Pollock did not judge the line of a top-spinner and was leg-before without scoring -- (AFP)
© 2000 Al Bawaba (www.albawaba.com)