Afghanistan inflicted more misery on Pakistan ahead of the Cricket World Cup with a surprise three-wicket victory on Friday.
Pakistan were in need of a lift after being thumped 4-0 in the one-day international series with England, but Afghanistan capitalised on their shortcomings in Bristol.
Babar Azam maintained his outstanding form with 112 from 108 balls as the ICC Champions Trophy holders posted 262 all out, Mohammad Nabi taking 3-46.
Dawlat Zadran and Rashid Khan took two wickets apiece, with only Shoaib Malik (44) offering any notable support for Babar - who scored a century and passed 50 twice in the series defeat to World Cup hosts England.
Hashmatullah Shahidi steered Afghanistan to victory with an unbeaten 74 after Hazratullah Zazai made 49, with 3-46 from Wahab Riaz proving to be in vain.
Shaheen Afridi (0-51 from six overs) was expensive on another bad day at the office for Pakistan a week before they face West Indies in their World Cup opener.
South Africa thrashed Sri Lanka by 87 runs in the other warm-up game of the day in Cardiff, captain Faf du Plessis top scoring with a rapid 88 in the Proteas' 338-7.
Sri Lanka were dismissed for 251 in reply, Andile Phehlukwayo the pick of the bowlers with 4-36. Dimuth Karunaratne (87) and Angelo Mathews (64) made half-centuries, while Avishka Fernando had to be taken off on a stretcher after appearing to suffer an ankle injury while fielding.