Chris Woakes and Jos Buttler played starring roles as England chased down 277 to win an absorbing first Test of the series against Pakistan.
The sixth-wicket pairing combined in a match-winning stand worth 139 to help Joe Root's side triumph against the odds in Manchester.
Pakistan appeared on course to prevail when they reduced their opponents from 86-1 to 117-5, while there was a further twist in a see-saw game when Buttler departed for 75 with 21 still required.
Stuart Broad also perished for seven following a promotion up the order, but the outstanding Woakes finished up on 84 not out to see England home with three wickets to spare.
The hosts had fought their way back into the contest with a clatter of wickets in the final session of the previous day's play, though still had work to do with the ball on Saturday morning.
Resuming on 137-8, Pakistan's final two wickets added 32 in just 16 deliveries, Yasir Shah increasing the lead as he smacked 33 in a hurry.
The flurry of boundaries – not all through conventional shots - hurt England, whose task became even harder when Rory Burns (10) fell early, trapped in front by the metronomic Mohammad Abbas.
Dom Sibley (36) and captain Root (42) combined to put on 64, only for a post-lunch collapse to put Pakistan firmly in control.
Sibley and Ben Stokes (9) both fell to leg-spinner Yasir Shah, Root edged behind off Naseem Shah and Ollie Pope (7) could do little with a brute of a delivery from Shaheen Afridi that climbed off a length, thumped into the batsman's glove and looped to gully.
Yet Buttler and Woakes responded to the precarious situation by going on the offensive, their attacking intent paying off as Pakistan pushed fielders back to stem the sudden flow of runs.
While Yasir Shah struck twice to create a little more tension late in the day, Woakes duly edged Shaheen to the third man boundary to get England over the line.
LATEST STORIES
Phillip Spooner Honoured at Barbados Sports Awards; Sada Williams Named Athlete of the Year
- 2024-12-20 22:20:55
- Hits 717
Guyana's GSL T20 operating in chaotic global cricket schedule environment, says WCA CEO Tom Moffat
- 2024-12-06 06:08:16
- Hits 572
Bumrah, Brook, Root and Head shortlisted for Sir Garfield Sobers Trophy for ICC Men’s Cricketer of the Year
- 2024-12-30 08:24:35
- Hits 287
Rain cuts slick Sri Lanka bowling performance short in Durban
- 2024-11-27 10:55:14
- Hits 176
Pakistan thrash Zimbabwe behind Ayub ton to level ODI series
- 2024-11-26 09:51:40
- Hits 161