Matt Prior's courageous 102 not out on day three of the first Test helped England recover from early trouble to set Pakistan a world record target of 435 to win at Trent Bridge on Saturday.
England then reduced Pakistan to 15 for three at stumps, leaving the tourists a further yet unlikely 420 to score with two days remaining.
Stuart Broad claimed the wickets of Salman Butt (8) and Azhar Ali (0) while James Anderson snared Umar Amin. Imran Farhat was 6 not out and night-watchman Mohammad Aamer was yet to score.
Pakistan, who lost their 2006 series in England 3-0, saw their three wickets fall for one run in a frenetic seven-ball sequence. Broad had figures of two for 14 and Anderson had one for one from four overs.
England's dominance and relaxed position by the close was such that Anderson was even able to oblige the capacity crowd who chanted 'Jimmy, give us a wave', while he was walking back to his bowling mark.
It was a see-sawing day in which Pakistan started by saving the follow-on when Umar Gul scored an exhilarating 65 not out from just 46 balls.
They needed eight runs at the start of play. England then slumped to 98 for six but Prior's third test hundred calmed the nerves.
Even though England held a first innings lead of 172, Prior's runs were important and took England to 262 for nine declared and effectively batted Pakistan out of the match.
His 136-ball effort ensured that Pakistan need to surpass the world record successful run chase of 418 that West Indies made in 2003 against Australia.
Pakistan's highest-ever fourth innings score to win is 315, also against Australia, in 1994.
Prior, dropped from England's one-day plans earlier this year, combined in valuable partnerships of 49 with Graeme Swann, 56 with Broad and then 49 with last man Steven Finn.
Prior was on 63 when Finn came to the crease and as he approached his century he took a single off the first ball of an over seven times but the number 11 batsman survived, for his nine not out from 50 deliveries.
The floodlights were switched on all day after play began under gloomy skies, but they stayed on long into the evening session despite bright sunshine breaking out.
Gul claimed three wickets after earlier entertaining spectators with his stroke-play. His innings contained eight boundaries and four sixes.