South Africa bowled out Pakistan for 270 and then came back to surpass the target, scoring 271 for 9 in 47.2 overs, with Aiden Markram top-scoring with a 93-ball 91.
Earlier, Pakistan chose to bat, and skipper Babar Azam made a 65-ball 50, while Saud Shakeel scored a run-a-ball 52 and Shadab Khan chipped in with a 36-ball 43.
However, Pakistan was unable to form partnerships as South Africa managed to take wickets, with Tabraiz Shamsi (4/60) emerging as the most successful bowler. Marco Jansen (3/43), Gerald Coetzee (2/42) and Lungi Ngidi (1/45) shared six wickets between them.
Pakistan: 50 runs from Babar Azam and 52 from Shakeel in 46.4 overs; Tabraiz Shamsi 4/60. Pakistan: 270 all out.
South Africa: (Aiden Markram 91, Shaheen Afridi 3/45, Mohammad Wasim Jr 2/50) 271 for 9 in 47.2 overs.