England's innings ended when Amir knocked over Bess's off-stump as the batsman went to drive.
England, resuming on an overnight 235 for six, lost their last four second-innings wickets for a mere seven runs in 18 balls on the fourth morning to be bowled out for 242.
Buttler and Bess, however, kept Pakistan at bay with Bess - whose first-class debut, against Pakistan, was just two years ago - driving Hasan Ali for four to give England the lead.
But at least Buttler, who finished on 66 not out, and Bess (55 not out) justified their selections and gave their team a bit of confidence ahead of a potentially even more hard five-Test series against top-ranked India.
Pakistan were dismissed for 363 in reply to England's first innings 184, a lead of 179 runs, on the third day of the first Test at Lord's on Saturday.
It was in the afternoon session that Pakistan put their foot down, reaffirming their dominance in the match with four wickets in the space of 37 balls. It was Buttler's stunning form in the Indian Premier League which earned him a recall to the Test team; he scored five straight fifties for Rajasthan Royals at a strike-rate of over 150.
Steve Smith to make comeback in Canada
Dwayne Bravo, Lasith Malinga, Chris Lynn, Darren Sammy, David Miller and Sunil Narine were also named as marquee players . According to cricket.com.au, David Warner has also been tipped to join the tournament, which begins on June 28.
Pakistan have now gone up 1-0 in this two-match series, recording their fifth Test victory at Lord's following wins at the "home of cricket" in 1982, 1992, 1996 and 2016. "He's got a great character and he really showed that".
England captain Joe Root rotated his fast bowlers in an effort to unsettle the batsmen before turning to off-spinner Dom Bess in his first Test. Azhar nudged the 20-year-old for a single to bring up a half-century that included six fours, but the compact right-hand batsman failed to add to his tally, falling lbw to a full-length delivery from James Anderson.
Buttler reviewed but, with replays indicating the ball would have clipped the top of the stumps, Australian umpire Paul Reiffel's decision was upheld. He will be offered another - and perhaps a final - chance to cement his place in the side in the second Test at Headingley.
England lost their last five wickets for just 16 runs.
Dawid Malan (12) and Jonny Bairstow (0) fell to Amir in the space of three balls, before Ben Stokes (9) pulled an innocuous delivery from Shadab to midwicket 17 balls later. It was Ed Smith's first team as England's selector and he surely threw up a few surprises.