A marvellous middle-order partnership between Jonny Bairstow and Moeen Ali piled the pressure on Pakistan on the fourth day of the third Test as England took their lead beyond 300.
Having erased their first-innings deficit courtesy of an excellent opening stand between captain Alastair Cook and Alex Hales on day three, England lost early wickets in their bid to take control going into the final day.
Cook (66) and Hales (54) went inside the opening five overs of the day, only for Pakistan to be frustrated by the watchful Joe Root (62) and James Vince (42).
Yasir Shah's (2-152) dismissals of Root and Gary Ballance (28) and Vince's failure to build on a strong start gave Pakistan great reason for hope with England on 282-5, but Bairstow (82 not out) and Moeen (60 not out) swung matters back in the hosts' favour in fine fashion.
Counter-attacking superbly, the pair ended the day with their partnership standing at 132 and England leading by 311 on 414-5, with the attention now turning to Cook's potential declaration on what promises to be an engrossing day five.
The England skipper was undone by a stunning diving Yasir catch in the fourth over and the prospect of an England collapse was furthered when Hales edged to slip from a Mohammad Amir (2-73) delivery outside off.
Root - who complained of back pain while on 25 - and Vince steadily guided England to an advantage of 80 at lunch, the former surviving as he was dropped by Misbah-ul-Haq at slip after 18 dot balls in a row.
The Yorkshireman was not so fortunate when he top-edged Yasir to short fine leg and nine overs later Vince again fell into the trap of Amir by edging another outside-off delivery to second slip.
Yasir, whose 90 wickets now stand as the most in a player's first 15 Tests, then struck to remove Ballance but his Yorkshire team-mate Bairstow and Moeen put things firmly in England's favour.
Pakistan struggled to threaten either of the duo as they each eased to half-centuries with little difficulty in a stand in which both displayed impressive fluency - upping the run rate to close to five an over.
Bairstow is now just 18 runs shy of his fourth Test century with England now likely the only potential victors, although Pakistan can afford to be confident of making sure of a draw on an increasingly flat pitch.