Pakistan kept alive their slim hopes of reaching the Twenty20 World Cup semi-finals with a 33-run victory over South Africa in a rain-shortened Super 12 match on Thursday, bringing the tournament's only unbeaten record to an end in the process.
On the ropes at 43-4 early in their innings, Pakistan rallied behind spectacular half centuries from Iftikhar Ahmed and Shadab Khan to post 185 for nine and delight the lively crowd of 30,000 roaring them on at the Sydney Cricket Ground.
South Africa would still have fancied their chances but Shaheen Afridi (3-14) claimed two early wickets and Shadab removed Temba Bavuma and Aiden Markram, who had built a promising third-wicket partnership of 49, in quick order.
The skies opened soon afterwards with South Africa on 69-4 after nine overs and an hour later they resumed with a revised target of 142 from five more overs under the Duckworth–Lewis–Stern method only to fall well short at 108 for nine.
The Proteas remain in second place behind India in Group 2 despite the loss and will secure one of the two semi-final spots if they beat the Netherlands in their final Super 12 match on Sunday.
To have any chance of progressing, Pakistan must beat Bangladesh in Sunday's second match at Adelaide Oval and hope the Dutch have staged an upset or Zimbabwe manage to stun India in the final group match in Melbourne.
Pakistan's hopes of reaching the last four were already hanging by a thread coming into the match and they looked over when top order batsmen Mohammad Rizwan, Babar Azam and Shan Masood all departed cheaply.
Mohammad Haris, thrown straight into the fray after coming into the squad as an injury replacement for Fakhar Zaman, had, however, showed his team mates the way with a blistering 28 off 11 balls that started with two sixes and a four.
Iftikhar, who hit 51, and Shadab, who clubbed 52 off 22 balls, followed his lead with a partnership of 82 for the sixth wicket to transform the innings, which ended with a rain shower, a few boundaries and a flurry of wickets.
While Pakistan skipper Azam's miserable tournament continued with six runs that left his tally at 14 from four innings, his South African counterpart Bavuma shrugged off the early loss of opening partner Quinton de Kock for a duck.
Bavuma, whose previous three innings at the tournament had earned him 14 runs, hit a dogged 36 before being caught behind off Shadab's first delivery.
Markram was bowled for 20 two balls later and after the rain break seamers Afridi, Mohammad Wasim and Naseem Shah successfully shackled the South Africans while chipping away with regular wickets.