All-rounder Imad Wasim's unbeaten 49 guided Pakistan to a thrilling three-wicket victory over minnows Afghanistan in Leeds on Saturday, maintaining their hopes of reaching the World Cup semi-finals.
Chasing a target of 228, Pakistan lost opener Fakhar Zaman for a duck on the second ball of the innings when he was trapped leg-before by off-spinner Mujeeb Ur Rahman.
Babar Azam, who scored his maiden World Cup century in Pakistan's win over New Zealand earlier this week, combined with Imam-ul-Haq to stabilise the innings with a steady 72-run partnership.
Off-spinner Mohammad Nabi removed the pair to expose the middle order, before Mohammad Hafeez and Haris Sohail fell cheaply to leave Pakistan reeling at 142-5.
Captain Sarfaraz Ahmed (18) and Shadab Khan (11) were run-out to set up an intense finale but Wasim and Wahab Riaz (15) ensured there were no further hiccups as they chased down the target with two balls to spare.
Pakistan now need to win their final match against Bangladesh on Friday and hope other results go their way to advance to the semi-finals.
Earlier, Pakistan fast bowler Shaheen Afridi claimed four wickets to restrict Afghanistan to a modest 227 for nine from 50 overs on a flat batting track at Headingley.
The game was marred by a clash between the supporters of both teams in the stands, with ESPNcricinfo reporting that at least two fans were evicted from the match.
Videos shared on social media also showed fans fighting outside the venue, with the International Cricket Council saying it will take action against "any anti-social behaviour".