Pakistan 579 (Babar 136, Imam 121, Shafique 114, Jacks 6-161) and 80 for 2 (Imam-ul-Haq 43*, Shakeel 24*) need 263 runs to beat England 657 (Brook 153, Crawley 122, Pope 108, Duckett 107, Mahmood 4-235) and 264 for 7 dec (Brook 87, Root 73, Crawley 50)
Rawalipindi: England's first Test against Pakistan is set for a excellent conclusion after an exhilarating fourth day in Rawalpindi.
An aggressive declaration at tea set the hosts 343 to win and England, bowling almost nothing but bouncers, struck with the new ball.
Abdullah Shafique was caught playing a rash pull and Ben Stokes got the huge wicket of Babar Azam, who was caught behind.
With Azhar Ali also having to retire hurt, Pakistan were effectively 25-3.
But Imam-ul-Haq and Saud Shakeel counter-attacked, taking Pakistan to 80-2, needing another 263 to win.
England earlier bowled Pakistan out for 579 in their first innings, with off-spinner Will Jacks claiming 6-161 on debut.
The tourists then raced to 264-7 from only 35.5 overs, picking up where they left off in their record-breaking first innings. Harry Brook cracked 87 from 65 balls, Joe Root 73 from 69.
In was breathless, barnstorming stuff, with the prospect of more drama to come on the final day.
However this Test plays out, England should be applauded for their intent to force a result on a flat pitch that could otherwise have produced a drab draw.
It is that intent which carried them on a sensational day's cricket, first through the thrilling assault with the bat then the relentless bouncer attack with the new ball.
Added to the 657 scored from 101 overs in the first innings, England's effort on Sunday gave them a match run-rate of 6.73 - the fastest in Test history of any team batting twice.
The declaration, leaving Pakistan about 100 overs for the chase, was generous, but immediately vindicated by the success of England's shock tactics.
Shafique needlessly pulled Ollie Robinson to deep square leg and, two balls later, Azhar left the field after being struck on the bottom hand by the same bowler.
When captain Babar under-edged opposite number Stokes to wicketkeeper Ollie Pope, Rawalpindi was left in stunned silence.
But Pakistan did not take a backward step. Imam moved to 43 and Shakeel 24 in a partnership of 55 that leaves the match hanging in the balance.