Century-maker Shan Masood and Shadab Khan snatched the initiative for Pakistan from England with a 105-run partnership on day two of the first test at Old Trafford on Thursday.
Pakistan lost three cheap wickets and scored only 48 runs in the morning session, but Masood and Khan were transformed after the lunch break.
They scored 27 runs in the first five overs after lunch, then England took the second new ball. But the Pakistan pair, especially Khan, was too confident to be confined again.
They were positive and rotated the strike, and the runs flowed as Pakistan added 125 runs in the middle session and reached 312-8 at tea.
Masood was a career-best unbeaten 151 and Khan was out for 45, one of three wickets to fall in the session.
England pacer Jofra Archer had a hat trick ball but Shaheen Afridi handled it.
Masood, on 77 at lunch, was comparatively zippy as he scored 23 runs in 26 balls to achieve his third century in three innings.
The first century by a Pakistan opener in England in 24 years took 251 balls, with 13 fours.
It followed his previous career-best 135 against Sri Lanka in December in Karachi and 100 against Bangladesh in February in Rawalpindi.
The partnership with Khan was aggressive and frustrating England until Khan came down the pitch at spinner Dom Bess, mis-hit and Joe Root took the catch at mid-on.
Archer trapped Yasir Shah on 5 and Mohammad Abbas on the next ball for a duck.
Knowing he was running out of partners, Masood attacked and moved to his best test score with his first six of the innings, sending Bess over midwicket, then smashing him back over his head for another six.
Afridi was with him at tea on 1 not out.