Reeza Hendricks starred with the bat for South Africa as it took a 2-1 lead in the ODI series with Pakistan, Dale Steyn and Quinton de Kock making a winning return in a rain-affected third game.
Steyn and De Kock were rested for the first two matches but came back to help the Proteas win by 13 runs on the Duckworth-Lewis method in Centurion.
Their triumph came in spite of a fine century from Imam-ul-Haq, who was the primary bright spot for Pakistan in a week that has seen captain Sarfraz Ahmed apologise for an on-field taunt aimed at Andile Phehlukwayo in the second ODI.
Imam's 101 proved in vain, however, as South Africa's chase of 318 saw Hendricks' excellent unbeaten 83 lead them to 187-2 in 33 overs before the rain came for a second time in their innings, forcing the umpires to call proceedings to a definite halt and put the Proteas a win away from adding ODI success to their Test whitewash of the tourists.
After Fakhar Zaman fell to Beuran Hendricks for two in the fourth over, Imam seemingly put the tourists on course for an imposing score as he strung together partnerships of 132 and 84 with Babar Azam (69) Mohammad Hafeez (52).
However, Imam's impressive 116-ball knock, which featured eight fours, would have been curtailed on 53 had he not been dropped at mid-off by Tabraiz Shamsi.
Phehlukwayo showed his team-mate how fielding should be done with a stunning, arching catch to dismiss Hafeez, and four balls after Imam brought up his fifth ODI century Shamsi ended his superb stay at the crease.
Pakistan were still in something of a strong position on 250-4 at that stage but they failed to build on that to the degree they would have liked despite Imad Wasim's unbeaten 23-ball 43. Kagiso Rabada ended his promising partnership of 52 with Shoaib Malik (31) before Hasan Ali (1) became Steyn's second victim in a disappointing finish.
The tourists will have had plenty of hope of defending their total when a direct hit from Shadab Khan saw De Kock run out for 33 to leave South Africa on 79-2.
Yet Hendricks struck eight fours and two sixes to post his second-highest ODI score, he and skipper Faf du Plessis (40) putting on 108 runs to move the hosts ahead on Duckworth Lewis as the elements eventually settled matters.
- Vijay Hazare Trophy 2023 LIVE Score, Round 4: Tamil Nadu beats Baroda; Mumbai, Saurashtra, Bengal win
- Indian sports news wrap, November 29
- Champions League 2023: Early qualification delights Atletico coach Simeone
- BCCI extends contract of India head coach Rahul Dravid and support staff
- NBA roundup: Kings stun Warriors, advance in tournament