Afghanistan batsman Hashmatullah Shahidi celebrates after clinching the victory over Pakistan on Friday. Photo: Andrew Couldridge/Action Images via Reuters

BRISTOL – Afghanistan batsman Hashmatullah Shahidi hit an unbeaten 74 as the World Cup underdogs stunned former champions Pakistan to win by three wickets with two balls to spare in a thrilling warm-up match in Bristol on Friday.

Chasing a modest 263 for victory, Afghanistan's opening batsmen Mohammad Shahzad and Hazratullah Zazai got them off to a blistering start, before Shahidi took charge to help them cross the finish line in the final over.

Pakistan batsman Babar Azam, who shone in their 4-0 series defeat by England this month, continued his excellent form with the bat ahead of the World Cup, scoring 112 off 108 balls but his team were restricted to a below-par 262 in 47.5 overs.

Afghanistan spinners Mohammad Nabi (3/46) and Rashid Khan (2/27) then choked the Pakistan batsmen to lay the foundation for a famous win, while paceman Dawlat Zadran claimed two wickets, including that of the dangerous Azam.