Pakistan put one foot in the semi-finals of the Twenty20I World Cup on Friday with a nervy five-wicket victory against Afghanistan in the Super 12 stage of the tournament.
The 2009 champions restricted Afghanistan to a modest 147-6 in a match between the top two teams in Group II at Dubai International Stadium.
When they came out to bat, skipper Babar Azam made a fluent 51 but it was Asif Ali's blistering 25 off seven balls that sealed their tense victory with six balls to spare.
Having beaten India and New Zealand in their first two matches, Pakistan are effectively in the last four with clashes against minnows Namibia and Scotland remaining.
Earlier, Pakistan pacer Shaheen Afridi repeatedly hit Hazratullah Zazai's pad after Afghanistan captain Mohammad Nabi elected to bat.
Pakistan blew a review trying to get Zazai lbw but went on to wreck Afghanistan's top order to reduce them to 39-4 in the sixth over.
Haris Rauf took a brilliant tumbling catch in the second over to send back Zazai and then caught Asghar Afghan off his own bowling.
Rahmanullah Gurbaz nearly ran himself out after a mix-up with Afghan but could not capitalise on the reprieve and Afghanistan lost the top half of their batting order even before the halfway stage of their innings.
Nabi and Gulbadan Naib came to Afghanistan's rescue striking identical unbeaten 35s to lend some respectability to their total.
Pakistan lost Mohammed Rizwan early in their reply but Babar and Fakhar Zaman (30) combined to shave off half the target.
Babar, then on 36, was adjudged lbw to Rashid Khan but the Pakistan skipper successfully reviewed the decision which was overturned.
Fakhar was not so lucky and fell lbw to Nabi in the next over blowing a review in his bid to prolong his stay.
Rashid (2-26) dismissed Mohammad Hafeez and Babar to inject fresh drama into the contest but the Afghans, who dropped two late catches, failed to ramp up pressure.
Pakistan needed 24 runs off the last two overs and Asif Ali smacked four sixes in the penultimate over from Karim Janat to seal their victory.