Pakistan resumed day two on 282-6 looking to get the score up to 400 but England had other ideas as Chris Woakes, who finished with figures of 6-70, and Stuart Broad bowled the tourists out for 339.
In reply, England got off to a good start but were halted as Pakistan leg-spinner Yasir Shah took five wickets to put his team in control despite Alistair Cook making 81.
Day three is therefore set up to be a cracker with all three results still possible which should attract a number of people to the game.
Woakes and Broad make early inroads to bowl Pakistan out for 339
Pakistan resumed day two on 282 for six with captain Misbah-ul-Hag resuming on 110 not out and Sarfraz Ahmed at the crease.
Sarfraz straight away took the attack to the England bowlers as he tried to put together a good partnership with Misbah.
The problem though was that he went for one to many big shots and was out for 25 of the bowling of Woakes, who took his fifth wicket in the innings. It didn't take long for Woakes to get his sixth wicket either, as he bowled Wahab Riaz for a second ball duck.
Broad then decided he wanted to get in on the action and he finally got Misbah out - bowled for 114 - with a beautiful delivery which beat the defences of the batsman.
England then, with their tails up and with ten and eleven at the crease, thought they would wrap up the innings straight away but that wasn't the case.
Mohammed Amir and Yasir added a crucial 23 runs before Broad removed Amir for 12 to dismiss Pakistan for 339.
England then in reply got off to a bad start when Rahat Ali removed Alex Hales for six to leave the score on eight for one.
Root and Cook put on a century partnership
Joe Root, in at his new position at number three, started to take the attack to the Pakistan bowlers, as himself and Cook saw the team to 64-1 at lunch.
Cook was 35 not out at lunch while Root was 23 not out; the pair had aspirations of keeping their partnership going after the resumption of play.
The duo came out and continued on from where they left off; Cook passed his fifty and was leading from the front.
Yasir rips through England's middle order to put the tourists in control
The partnership had reached 110 then Yasir Shah got the crucial breakthrough for Pakistan when he removed Root for 48, with the batsman mistiming a cross batted shot.
The leg spinner took two more wickets before tea when he removed James Vince for 16 and the returning Gary Ballance for six.
Cook, though, was still there at tea on 75 not out as England reached 153-4 and were hoping to build some partnerships after tea.
Johnny Bairstow was at the crease with Cook when they entired the evening session and, just as the pair started to get a partnership going, Cook was bowled on 81 by Amir via an inside edge which left the England captain very frustrated.
Bairstow was still there and was looking good at the crease until Yasir returned to bowl the inform batsman for 29, leaving the hosts in a real battle to get up to Pakistan's score at 193-6.
The wicket of Bairstow brought Woakes and Moen Ali together and the pair started to build a decent partnership, but it was ended on 39 when, once again, Yasir got the wicket of Ali for 23 to earn his fifth in the innings.
Broad came in at the fall of the Ali wicket and he managed to see play out until the end of the day alongside Woakes, who finished 31 not out, as England made it to 253-7, 86 runs behind Pakistan's first innings score.