Pakistan sparked a top-order collapse before Jos Buttler led an England fightback as the first Test headed for a dramatic finish at Old Trafford on Saturday.
England were 167-5 at tea on the fourth day, needing a further 110 runs to reach a challenging target of 277.
Only twice has a team chased more than 200 to win in the fourth innings of a Test at Old Trafford, with England making 294-4 against New Zealand in 2008 and 231-3 against the West Indies in 2004.
England, trying to end a run of losing the first Test in each of their last five series, were making steady progress at 96-1.
However, they lost four wickets for 31 runs in slipping to 117-5, with captain Joe Root and Ben Stokes both falling in the collapse.
But wicketkeeper Buttler, who had had a poor match in the field, twice missing Shan Masood on 45 during the Pakistan opener's first-innings 156, counter-attacked.
One of the world's leading white-ball batsmen, but with just one Test century to his name, Buttler was 32 not out at tea, having shared an unbroken stand of exactly 50 with fellow World Cup-winner Chris Woakes (26 not out).
After Mohammad Abbas had pinned Rory Burns lbw, fellow opener Dom Sibley and skipper Root kept Pakistan at bay.
But leg-spinner Yasir Shah lured Sibley (36) into an edged drive that was well caught by Asad Shafiq at slip.
Root made a composed 42 but was undone by teenage paceman Naseem Shah when he nicked a ball that nipped away to Babar Azam in the slips.
Stokes had guided England to an astounding one-wicket win over Australia from a seemingly hopeless position with a brilliant century in the third Ashes Test last year.
But there was no repeat of his Headingley heroics on Saturday when he fell for just nine, with wicketkeeper Mohammad Rizwan, impressive behind the stumps throughout this match, holding an excellent catch after Stokes got a thin glove to a Yasir googly that bounced.
It needed a Pakistan review to confirm Stokes' dismissal -- a bold decision by captain Azhar Ali after the tourists had squandered a review against Stokes moments earlier.
But the TV umpire was not required when Ollie Pope received a brute of a ball from towering left-arm paceman Shaheen Afridi that lept off a length, the ball ballooning to Shadab Khan as he ran forward from gully.
Earlier, Pakistan resumed on 137-8, a lead of 244, before Yasir led a tailend rally that saw 32 runs added in just 16 balls before his team were dismissed for 169 in their second innings.
Yasir struck a quickfire 33 off 24 balls that included consecutive boundaries off fast bowler Jofra Archer and a six off Stuart Broad.