In a game that ebbed and flowed to the hilt, Imad Wasim showed nerves of steel with an unbeaten 49 off 54 balls as Pakistan kept their semifinal hopes alive with a three-wicket victory over Afghanistan in a thrilling World Cup clash here on Saturday.
After restricting the already knocked out Afghanistan to 227/9, Pakistan made heavy weather of the target by losing wickets at regular intervals.
In the last five overs, Pakistan needed 46 runs with four wickets in hand. But skipper Gulbadin Naib missed a trick by bringing himself to bowl instead of persisting with spin which is their strength.
Gulbadin gifted Imad a full toss that went for four. In the next ball, Imad hit the ball in the air but Asghar Afghan lost it in the sky to let go of the chance.
The next two balls were hit for consecutive fours as the Afghanistan skipper leaked 18 runs to bring down the equation to 28 runs off 24 balls.
Gulbadin made amends in the field by effecting the run out of Shadab Khan (11) in the 47th over, but Wahab Riaz hit an unbeaten 9-ball 15 to bring the equation down to six runs off the final over with Imad on strike.
The ice-cool Wales-born all-rounder kept things simple and with two balls to go, smacked Gulbadin for a four to win it for his country. It was the fifth four he hit in his stellar innings.
With nine points from eight matches, Pakistan pipped England in the points table to the fourth place. Hosts England will take on India on Sunday. Pakistan have one game left, against Bangladesh on July 5.
Pakistan were off to a stuttering start as Fakhar Zaman (0) was trapped in front by Mujeeb Ur Rahman (2/34) in the second ball of the innings.
Imam-Ul-Haq (36; 51b, 4x4) and Babar Azam (45, 51b, 4x5) then added 72 runs for the second wicket before Mohammad Nabi (2/23) had Imam stumped as the batsman needlessly charged down the track.
Babar was clean-bowled by Nabi soon after and with Mohammad Hafeez (19) also not hanging around for long, Pakistan were reduced to 121/4 before Rashid Khan castled the in-form Haris Sohail (27).
In the 37th over, umpire Paul Wilson turned down an LBW appeal by Rashid though replays showed it to be very close. But with both sides having no reviews left, it could not go upstairs as Afghanistan kept turning the screws on their more fancied rivals.
Skipper Sarfaraz Ahmed (18) was run out and from then on Imad held fort at one end, also keeping pace with the asking rate as Pakistan emerged victorious in the end.
Earlier, Shaheen Shah Afridi snared four wickets as Pakistan restricted Afghanistan to 227/9.
Afridi, who returned match-winning figures of 3/28 against New Zealand in the last match, conceded 47 runs in 10 overs and bagged four wickets to never let Afghanistan take the charge as Imad Wasim (2/48) and Wahab Riaz (2/29) also came good with the ball.
For the Afghans who won the toss and elected to bat first, Asghar Afghan and Najibullah Zadran top-scored with identical scores of 42.
While Asghar blazed his way off 35 balls, his innings laced with three fours and and two sixes, Zadran took 54 deliveries hitting six fours.
Opener Rahmat Shah (35; 43b, 4x5) also looked good before he was caught by Babar Azam at short cover off Wasim.
Afghanistan were 27/2 before Rahmat and Ikram Alikhil (24) tried to steady the ship.
But after Rahmat's dismissal, things fell apart although Asghar and Alikhil shared a 64-run stand for the fourth wicket.
While Asghar was caslted by Shadab Khan, Alikhil could not takcle the pressure of dot balls before finally holing out to long on where Mohammed Hafeez took an easy catch off Wasim.
Zadran and Mohammed Nabi then stitched together a crucial 42-run partnership for the sixth wicket before Riaz got Nabi's back and Zadran dragged a Afridi delivery on to his stumps.
The Afghans could not manage to score much in the last five overs but still managed to put up their highest score in the tournament batting first.
Brief scores: Afghanistan 227/9 in 50 overs (Asghar Afghan 42, Najibullah Zadran 42, Shaheen Shah Afridi 4/47) vs Pakistan 230/7 in 49.2 overs Imad Wasim 49 not out, Babar Azam 45; Mohammad Nabi 2/23, Mujeeb Ur Rahman 2/34)