An unbeaten 83 from Reeza Hendricks guided South Africa to a 13-run win over Pakistan on the Duckworth-Lewis-Stern method in the rain-affected third one-day international at Centurion.
Only 33 overs of the Proteas' reply were possible, but they were coasting at 187-2 in pursuit of 318 before the rain intervened.
Quinton de Kock and Hashim Amla both made starts before they were dismissed in the chase - De Kock, on his return to the side after being rested, making 33 and Amla 25.
But Hendricks passed 50 for just the second time in his ODI career in an unbroken partnership of 108 with captain Faf Du Plessis (40 not out) to put South Africa 2-1 up in the five-match series.
Imam-ul-Haq had earlier anchored the Pakistan innings with his fifth ODI ton, the opener making 101 with support from Babar Azam (69) and Mohammad Hafeez (52) as the tourists posted an impressive 317-6 from their 50 overs.
Watch the fourth ODI between South Africa and Pakistan, in Johannesburg, live on Sky Sports Cricket from 7.55am on Friday.