Pakistan were in a strong position to win the second Test and level the series after removing both England openers on a tricky Multan pitch on Thursday with spinner Sajid Khan being the hero.
The hosts set England a daunting target of 297 before Sajid dismissed Ben Duckett for a duck and fellow spinner Noman Ali had Zak Crawley (three) to leave England on 36-2 after day three.
Ollie Pope and Joe Root were unbeaten on 21 and 12 respectively with 261 still needed for victory and two days left.
Before that, middle-order batsman Salman Agha scored 63 and together with Sajid (22) lifted the home side from a precarious 134-5 with a ninth-wicket stand of 65, taking Pakistan to 221 in their second innings.
England spinners Shoaib Bashir (4-66) and Jack Leach (3-67) had set the visitors on course for another victory but England did not help themselves, dropping Agha on four and then six.
In the end, it was Brydon Carse (2-29) who dismissed Agha, caught in the slip, before fellow pacer Matthew Potts got Sajid out to wrap up the innings.
Pakistan, who made 366 in their first innings, trail the three-match series 1-0 following an innings loss in the first Test, also in Multan.
Earlier, off-spinner Sajid took 7-111, his second five-wicket haul, to bowl England out for 291 on a turning pitch, recycled from the first Test when it was a batting paradise.