Pakistan were lifted by Sajid Khan's continued brilliance with both bat and ball against a scratchy England on the third day of the second Test to leave them eyeing a long-awaited home Test win.
England, set a massive 297-run target for victory on a tricky pitch, wobbled to 2-36 at stumps as spin-heavy Pakistan exploited the recycled pitch and nullified the tourists' aggression.
Sajid dismissed first-innings century-maker Ben Duckett for a duck off his third ball. Left-arm spinner Noman Ali then had Zak Crawley stumped with a brilliant ball that stranded the right-hander out of his crease.
Ollie Pope was unbeaten on 21 and Joe Root not out on 12, but England move into the fourth day requiring 261 more.
"The conditions are in our favour," Ali said. "The ball is turning and hopefully we will bowl them out tomorrow."
Pakistan have not won any of their last 11 Tests at home since March 2021 and have lost their last four home Tests, including the first against England at the same venue last week.
England won by an innings and 47 runs, so Pakistan deployed an all-spin attack and dried out the same pitch.
Sajid dug in for 22 invaluable runs in the second innings and helped swell Pakistan's lead to 296 before the home team were bowled out for 221 late in the final session on Thursday.
Off-spinner Shoaib Bashir (4-66), effective against the left-handers, and Jack Leach (3-67) took the bulk of the wickets and Brydon Carse grabbed 2-29 with his reverse swing.
Pakistan were 231 runs ahead when Mohammad Rizwan (23) edged Carse into the slips in the final session. But Sajid showed plenty of grit and shared a 65-run ninth-wicket stand with Salman Ali Agha, who profited from dropped catches on 4 and 6, and scored 63 off 89 balls.
Carse was twice on the receiving end in the space of three balls when, first, Jamie Smith dropped a regulation catch of Agha, and then Joe Root, fielding close in the slips cordon with his helmet on, could not grasp an edge to his right.
"Realistically, it's going to be a tough chase," England batting coach Paul Collingwood said. "We can see (the pitch is) doing plenty for the spinners, there's a lot of cracks. But we know this team is capable of (doing) some special things ... it will be one hell of a chase, something we will relish and try to go for."
England had been batting at the start of the day, resuming on 6-239 before finishing their first innings on 291, trailing Pakistan by 75.
Bashir sliced through the Pakistan top order in the first session. Left-handers Saim Ayub and captain Shan Masood were caught close to the wicket and Abdullah Shafique feathered a catch down the leg-side to the off-spinner.
Kamran Ghulam (26), who made a dream debut hundred in the first innings after he replaced out-of-form Babar Azam at No.4, and Saud Shakeel (31) were prised out by leg before wicket decisions while attempting sweep shots against Leach.
Although England kept on coming hard at Pakistan's batters, Agha's two let-offs besides Sajid's determined batting allowed Pakistan to set a challenging, and probably match-winning, target.