The Men in Green set a first-innings target of 232 for the Proteas and it proved to be too much as South Africa fell short with 17 overs left.
© Getty Images
AB de Villiers put on a fine batting display to give his side any real hope of winning, as he hit 77 runs off 58 balls.
However, after the partnership was dismantled, wickets started to fall one after another, creating extreme pressure on the lower order to make up the runs.
De Villiers stuck in there, despite seeing batsmen come and go in quick succession.
Pakistan's Sarfraz Ahmed equalled the world record with six catches in one game, as the Men in Green put on a superb bowling display.
The match reached a thrilling climax, as Pakistan won by 29 runs via the Duckworth-Lewis method.
South Africa and Pakistan are both on six points in second and third respectively, with both teams sitting two points behind India who top Pool B.