Birmingham (Agencies): Pakistan beat Afghan by three wickets with just two balls to spare to keep their World Cup semi-final hopes alive.
Pakistan, chasing a modest 228-run target, were in grave danger at 156 for six in the 39th over.
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.
If they win their final game against Bangladesh and England fail to win both of their last two matches, against India and New Zealand, Pakistan will qualify for the semi-finals.
Pakistan: Imam-ul-Haq, Fakhar Zaman, Babar Azam, Mohammad Hafeez, Haris Sohail, Sarfaraz Ahmed (capt & wk), Imad Wasim, Shadab Khan, Mohammad Amir, Wahab Riaz, Shaheen Afrid
Afghanistan: Gulbadin Naib (capt), Rahmat Shah, Hashmatullah Shahidi, Asghar Afghan, Samiullah Shinwari, Mohammad Nabi, Najibullah Zadran, Ikram Alikhil (wk), Rashid Khan, Hamid Hassan, Mujeeb Ur Rahman