Pakistan completed a routine 49-run win over South Africa at Lord's as the Proteas were knocked out of the World Cup.
Haris Sohail made a quick-paced 89 off 59 balls, hitting nine fours and three maximums in his innings, and was aided by Babar Azam's 69 plus 44 from both openers Imam-ul-Haq and Fakhar Zaman saw South Africa set 309 for victory.
Needing to win to keep their slim chances of qualifying for the semi-finals alive, South Africa lost Hashim Amla in the second over for two as Mohammad Amir (2-49) and Shadab Khan (3-50) helped restrict the Proteas to 259-9 - Faf du Plessis top-scoring with 63.
Although South Africa still have two group matches remaining, they are five points adrift of fourth-placed England who have eight points, but Pakistan remain in the hunt having moved on to five points with three games still to play.
After opting to bat first, Imam and Fakhar's opening stand might have been ended earlier than it was when the latter looked to picked out Imran Tahir at deep square, only for replays to show part of the ball came into contact with the ground - much to the fielders' chagrin.
Tahir had the last laugh though, as he picked up both openers, Fakhar's poor shot selection seeing him caught at slip before a brilliant caught and bowled saw the end of Imam.
The introduction of Sohail to the action, after Aiden Markram removed Mohammad Hafeez (20) lbw, change the impetus of the game as the Pakistan batsman played with power and precision to bring up a 38-ball half-century.
Haris put on an 81-run fourth-wicket stand with Babar Azam (69) and dominated his 71-run partnership with Imad Wasim (23) but fell short of a maiden World Cup century when he was caught behind of the penultimate ball of the match off Lungi Ngidi - Pakistan finishing on 308-7.
South Africa's reply got off to the worse possible start, Amir trapped Amla lbw with his first ball, though the Pakistan pace bowler needed DRS to confirm it was out.
Quinton de Kock (47) and Du Plessis rebuilt slowly - and looked to help the Proteas to a position from which they could propel - but Shadab claimed two scalps in three overs to dismantle South Africa's chase.
A brilliant diving catch from Imam saw the back of De Kock, before Shadab rattled Markram's offstump and Amir then returned to claim the important scalp of Du Plessis - who saw a top-edge well taken by Sarfaraz.
Rassie van der Dussen (36), David Miller (31) and Andile Phehlukwayo (46 not out) added valuable contributions but Wahab Riaz bowled Chris Morris (16), Kagiso Rabada (3) and Ngidi (1) as South Africa limped out the competition.
Watch England play Australia live on Sky Sports Cricket World Cup from 9.30am on Tuesday, July 25.