England's first Test against Pakistan is set for a grandstand 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 had 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.
Ben Stokes led from the front, shocking Pakistan with 100% of his new-ball deliveries shortEngland's relentless will to win
However this Test plays out, England should be applauded for their intent to force a result on a flat pitch that could have otherwise 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.
Blistering Brook leads England assault
There was no surprise in the way England batted, but that does not make the breathtaking pace at which they laid waste to the Pakistan bowling any less impressive.
In the 28.5 overs between lunch and tea, England crashed 218 runs in an electric atmosphere created by the home fans, who still roared at every Pakistan success.
Chief destroyer was Brook, who was on course for the fastest Test hundred by an England batter for the second time in the match. He hit his third ball for six and bludgeoned plenty more through the leg side.
By that point Zak Crawley had timed the ball sweetly for 50, while Root made up for missing out in the first innings by exhibiting all his class.
The former skipper played into gaps and ran hard. He played sweeps of all kinds against the spinners, the most surreal of which was when he faced Zahid Mahmood in a left-handed stance.
Brook and Root added 96 in 14 overs, Brook shared 56 in only five with Jacks, who clubbed three sixes in his 24.
When Brook was bowled aiming another heave at Naseem Shah, tea was taken and England declared.
Harry Brook targeted the leg side in his blistering knockJacks the lad
Jacks barely bowled for Surrey until the start of the summer and only found out he was playing in this match as a replacement for the ill Ben Foakes two minutes before he got his cap.
He is now the owner of the best figures by an England bowler of any kind on Test debut since 2003
After Pakistan resumed on 499-7, Jacks took all three wickets to fall on Sunday morning, including ending an irritating eighth-wicket stand of 57 between Salman Agha and Mahmood.
Salman overturned being given out lbw off Jacks on 45, moving to 53 before edging to slip as Jacks angled the ball across from round the wicket.
Mahmood was cleverly stumped by stand-in wicketkeeper Pope attempting a reverse-sweep and Haris Rauf's heave ended in hands of Root at slip.
It left Jacks as the first England spinner to take six wickets on debut in 29 years and signalled the start of the tourists' charge.