Pakistan kept their nerve to avoid a huge shock on Saturday, beating a spirited Afghan side by three wickets with just two balls to spare to keep their World Cup semi-final hopes alive.
All-rounder Imad Wasim hit Afghanistan skipper Gulbadin Naib for a boundary through the covers to seal the win off the fourth ball of the last over, prompting a pitch invasion.
Pakistan, chasing a modest 228-run target, were in grave danger at 156 for six but man-of-the-match Imad (49 not out) and Shadab Khan (11) put on 50 for the seventh wicket to revive their hopes.
The win lifts Pakistan into fourth place in the 10-team table, above hosts England after a poor start to the tournament.
"When I went in they were bowling brilliantly but I just hung in there," said Imad.
"We wanted to bat out the 50 overs and see."
"Gulbadin (Naib) was the only one who could be targeted. They have world-class spinners so we attacked him. Thank you to the crowd, it feels like home here. They gave us a boost in confidence.
"Win our next game and we'll see what happens. Now we believe we can win from anywhere." Pakistan were in deep trouble when their captain Sarfaraz Ahmed was run out for 18 while taking a unnecessary second run, leaving Pakistan needing 72 off the last eleven overs.
They took 18 off Naib in the 46th over, which brought the target down to a manageable 28 off four overs.
Shadhab was run out for 11 with the score on 206 but Wahab Riaz (15 not out) and Imad saw Pakistan home and condemned plucky Afghanistan to an eighth consecutive defeat.
"We fight really well, the boys gave 100 per cent but in the end we missed an opportunity to win the match," said Afghanistan captain Naib. "Credit to Pakistan, they controlled their nerves.
Shaheen Shah Afridi (centre) celebrates with teammates after the dismissal of Afghanistan's Hashmatullah Shahidi. Lindsey Parnaby/AFP
"We missed again. You can face a lot of these situations, we are working harder and harder. The matches we have lost, we have improved."
Captain Sarfaraz Ahmed hailed his side's three-wicket victory over Afghanistan at the Cricket World Cup as "a great win" despite a nervy finish on a dramatic day at Headingley.
There were also ugly scenes before the match on Saturday when police had to intervene after violent clashes between rival supporters outside the ground.
"It is a great win for us on not an easy pitch," said Sarfaraz.
"We know it was not an easy target. Their bowlers used the conditions very well. Everyone chipped in, it was good team work."
After a terrible start with just one win from their opening five matches, Pakistan have now won three in matches in succession to leapfrog hosts England into fourth place.
A semi-final place is still in England's hands, but they face the daunting task of having to beat at least one and most likely both of India and New Zealand in their final two fixtures.
"We all know that it is not easy to win our last four games, we go match by match," added Sarfaraz, whose side face Bangladesh in their final group game. We will all be watching India v England tomorrow."
Afghanistan captain Gulbadin Naib was left to regret bringing himself on to bowl at the death.
With the run rate spiralling, his penultimate over went for 18 runs.
"It was bad luck," said Gulbadin.
"It was very difficult for Pakistan to chase that total on a turning wicket. It was the turning point."
Agencies