Naseem Shah peeled off two successive sixes off the first two balls of the final over as Pakistan broke Afghanistan’s hearts in Sharjah.
The fast bowler’s remarkable cameo gave Pakistan a one-wicket win which sends them through to Sunday’s Asia Cup final, where they will play Sri Lanka.
Afghanistan had been defending 11 off the final over, with Fazalhaq Farooqi, who had been outstanding until that point, bowling.
He sent down two low full tosses, and Naseem muscled each of them over the long off boundary.
Until that point, it had felt like the Afghans were set to create a remarkable upset that would have kept all four sides in with a chance of making the final.
Afghanistan had got off to a rapid start with the bat, with Rahmanullah Gurbaz again cashing in against the new ball.
The wicketkeeper-batter hit two sixes in the 11 balls he faced, but once he was bowled by Haris Rauf – with Afghanistan on 36 for no loss in the fourth over – the scoring rate slowed.
Presented with a pitch of little pace, Pakistan’s fastest bowler was their best.
Rauf was a constant threat, and later added the dismissal of Ibrahim Zadran, who scored slowly but did top score with 35 for the Afghans.
A target of 130 felt paltry at halfway, but the Afghans were immediately given reason to believe an upset was possible.
Babar Azam, who was displaced at the top of the T20I batting rankings by his opening partner Mohammed Rizwan a day earlier, has endured a tough time at this competition.
It only got worse when he followed his opposite number – Afghan captain Mohammed Nabi – in falling for a golden duck against the left-arm pace of Farooqi.
Fakhar Zaman has seldom looked more cheery than his captain at this Asia Cup, either, and he failed to snap out his funk.
When he was run out for five by a direct hit from Najibullah Zadran, Pakistan were 18 for two and the Afghans were infused with optimism.
They were helped by the excellence of Mujeeb Ur Rahman with the new ball. The spinner did not take a wicket, but went for just 12 from his four overs.
Pakistan rallied thanks to Shadab Khan, who took a Nabi over for 14 runs, as they reached 87 for three.
Farooqi and Fareed Ahmed, Afghanistan’s pair of left-arm quicks, each took three wickets apiece to take their side to the brink of victory – only for Naseem to extinguish their hope.