Pakistan clung to slim hopes of making the Cricket World Cup semifinals and ended South Africa's chances in a 49-run thumping victory at Lord's on Sunday.
Pakistan needed the win more, as it had a game in hand and required fewer other results going its way, and delivered with a lively, enthusiastic performance before an equally passionate crowd heavily in its favor.
After losing narrowly to New Zealand on Wednesday, South Africa appeared ready to trudge home in a largely downbeat display. Pakistan was conceded 308-7, and South Africa's batting struggles were underlined again when it petered out on 259-9.
Pakistan's second win in six matches kept it in the playoffs hunt, three points behind England, with unbeaten New Zealand next in its sights on Wednesday.
The Proteas slumped to a fifth defeat and a washout in seven matches. With two matches to go, their misery is officially over, beside winless Afghanistan. Though this is the worst-affected World Cup because of rain, nothing has been damper than the performances from South Africa, which has failed to make the playoffs for only the second time.
The match was redemption of sorts for Pakistan's batsman Haris Sohail, spinner Shadab Khan, and Shaheen Afridi.
Haris scored his first two ODI centuries in March in the home sweep by Australia, but so-so scores in May in the England series doomed him to only one bat in the World Cup. He made 8 in a total of 105 against the West Indies. Only after Shoaib Malik made 8 across three matches was Haris recalled, and he took his chance at Lord's.
Haris featured in key partnerships of 81 with Babar Azam and 71 with Imad Wasim. He was the closest to scoring the first century by either team at this World Cup, but he couldn't get the strike back at the death and was out for 89 trying to slog the penultimate ball, his 59th of a superb innings that included three sixes and nine boundaries.
Pakistan started the 40th over on 217-3 and Haris ensured a challenging total was set.
Given a great total to defend — South Africa failed to challenge 311 by England and 330 by Bangladesh in its first two matches — Shadab grabbed three or more wickets for only the second time in a year.
The only specialist spinner in Pakistan's squad missed the England series in May through illness. He was pounded by England and India and had only two wickets in the tournament, but rewarded the selectors' perseverance. Shadab dismissed Quinton de Kock on 47 to ruin South Africa's longest partnership of 87 with captain Faf du Plessis, then last recognized batsmen Aiden Markram and Rassie van der Dussen.
Medium-pacer Shaheen was the only other change by Pakistan after losing to India last weekend, in for Hasan Ali. Afridi had taken 2-70 in his one previous appearance, while Pakistan ran out of patience with Hasan, 2-256 across four matches. Shaheen knocked over David Miller's middle stump on 31 in the 41st over.
Aided by thin cloud cover, fast bowler Mohammad Amir trapped Hashim Amla with his first ball in the second over and got a top edge out from du Plessis in the 30th. The two wickets gave Amir 15, tying Mitchell Starc at the top of the tournament wickets list.
South Africa's run chase ended when du Plessis' careful innings of 63 from 79 balls was undone by Amir at 136-4. Du Plessis bemoaned before the match the South Africa batsmen's failure to make big scores, including himself. This was only his second half-century of the tournament. No South African has made a century.
After du Plessis, all that was left was mopping up, and the venerable Wahab Riaz, who suffered dropped catches twice in an over, came back to bowl Chris Morris, Kagiso Rabada and Lungi Ngidi and finish with 3-46. Andile Phehlukwayo was not out 46.
Rabada and Ngidi were also flayed ruthlessly when they opened the bowling. Pakistan openers Fakhar Zaman and Imam-ul-Haq raced out of the blocks to share 81 in 15 overs. Only the arrival of Morris and Phehlukwayo put a lid on the fireworks.
Both openers fell on 44 to legspinner Imran Tahir, the two wickets making him South Africa's leading wicket-taker in World Cups with 39, one more than retired fast bowler Allan Donald. Haris and Babar Azam, who hit 69, were content to let Tahir bowl out his 10 overs, and wait for the pace bowlers. It all worked out.