Pakistan put their miserable hammering by arch-rivals India behind them with a shock 19-run win over South Africa at Edgbaston on Tuesday that kept their Champions Trophy semi-final hopes alive.
Just three days after suffering a humiliating 124-run defeat by title-holders India at Edgbaston in their opening group match, with former skipper Shahid Afridi among those slamming a "clueless" display, Pakistan's return to the Birmingham ground saw them make a mockery of the rankings which had them bottom and South Africa top in this eight-team one-day international tournament.
Having conceded 319 for three against title-holders India, Pakistan restricted South Africa to 219 for eight after losing the toss.
After the spinners did the initial damage, paceman Hasan Ali took three for 24 in eight overs.
David Miller's unbeaten 75 kept the Proteas in the game.
And when fast bowler Morne Morkel took two wickets in three balls, Pakistan were faltering at 41 for two under the Edgbaston floodlights.
But Babar Azam (31 not out) and Shoaib Malik (16 not out) took Pakistan to 119 for three off 27 overs when heavy rain stopped play at 7:41pm local time (1841 GMT).
That left them well ahead of their target score of 101 so that, when the umpires decided a resumption was impossible, Pakistan had beaten South Africa under the Duckworth/Lewis method for the second successive ICC 50-over tournament following a 29-run win at the 2015 World Cup.
It all left Group B wide open, with three teams on a win apiece after South Africa defeated Sri Lanka by 96 runs at the Oval last week.
Pakistan's Mohammad Amir and Junaid Khan, in for the injured Wahab Riaz, took the new ball.
Pakistan 119 for 3
(Babar 31*, Morkel 3-18) beat South Africa 219 for 8
(Miller 75*, de Kock 33, Hasan 3-24) by 19 runs (DLS method)
(played, won, lost, tied, no result, points, net run-rate):
India 1 1 0 0 0 2 +3.02
South Africa 2 1 1 0 0 2 +1.00
Pakistan 2 1 1 0 0 0 -1.54
Sri Lanka 1 0 1 0 0 0 -1.92