Haris Sohail smashed a rapid-fire 89 to help Pakistan reach 308-7 at Lord's on Sunday, leaving South Africa with a sizeable run chase to keep their slim World Cup hopes alive.
Pakistan got off to a flying start with openers Fakhar Zaman and Imam-ul-Haq hammering 29 off the first four overs, against a South Africa side who looked almost visibly dejected in the face of the early onslaught.
Yet the bleeding was stemmed as South Africa steadied and with the run-rate under control they began to threaten, as both openers departed for 44 to Imran Tahir while Aiden Markram claimed the wicket of Mohammad Hafeez for 20.
Babar Azam picked up the pace with 69 off 80 balls before he was caught off the bowling of Andile Phehlukwayo and Sohail helped Pakistan past 300 before his innings ended after 59 balls when he was caught by keeper Quinton de Kock off Lungi Ngidi in the final over.
Defeat would leave South Africa with three points from their opening seven matches and unable to secure a spot in the top four - who all advance to the semi-finals.