On a day when Mohammad Amir looked to be getting back to his best, Alastair Cook and Joe Root managed to ride out the storm and give England the advantage.
Cook and Root put on 185 for the second wicket, shielding England's middle order from a menacing Pakistan pace barrage.
Alex Hales was first to go early in the morning session, as he got an absolute corker from Amir that swung back beating his bat and slamming into his stumps when he had 10 and England had 25.
Cook would draw level with the great Sir Donald Bradman, when he got passed three figures for the 29th time in Test cricket, although Cook has taken a lot longer to reach the milestone than the prolific Australian legend.
The England skipper was undone as he was surprised by an Amir delivery that kept low, Cook could only edge the ball into his stumps. England were well set though on 210/2 with Root looking good on 87.
James Vince came to the wicket but looked less than assured, and there was a sense that it was only a matter of time before he departed.
He was given a life when Younis dropped him at slip off the bowling of Amir for six, but he would only manage another 12 runs before he chased a wide one from Rahat Ali and got a faint edge through to the keeper leaving England 238 for 3.
Pakistan seemed to be threatening to run through the England middle order but Gary Ballance and Root steadied the ship putting on 73 for the fourth wicket, before Ballance chopped on weakly shortly after Pakistan took the new ball to give Rahat his second wicket.
At 311 for 4 England were still in control as Chris Woakes was sent in as night watchman.
England finished the day on 314 for 4 with Root on 141 not out and Woakes on 2.
Amir finished the day with figures of 2 for 63, while Rahat managed 2 for 69.