Birmingham: England openers Alastair Cook and Alex Hales shared an unbroken stand of 120 to leave the third Test against Pakistan delicately poised after three days at Edgbaston.
Captain Cook made 64 not out and Hales an undefeated 50 to give the home side a lead of 17.
England earlier fought back well with the ball, taking five wickets for 42 runs to bowl Pakistan out for 400.
Stuart Broad and Chris Woakes each took three, while Misbah-ul-Haq made 56.
It was the wicket of Misbah, bowled by James Anderson, that began the England recovery, one desperately needed after Pakistan dominated day two to begin Friday on 257-3.
There was a wobble when Anderson was controversially ordered from the attack, an umpiring decision that helped Sarfraz Ahmed (46 not out) shepherd the tail to add 32 for the final two wickets.
But England's openers took advantage of an increasingly benign surface and a lack of swing or turn to give the hosts the upper hand.
Earlier, Pakistan grafted out a first-innings lead of 103 runs during which the home side's James Anderson was removed from the attack for running on the pitch.
Pakistan progressed from their overnight 257 for three to 400 all out at tea, captain Misbah-ul-Haq leading from the front with a combative 56.
Misbah was bowled by Anderson before England's leading strike bowler was ordered out of the attack for the rest of the innings by umpire Joel Wilson after transgressing cricket's follow-through laws for a third time.
He had apologised to the umpires on Thursday for his reaction to receiving his first two warnings for running on the pitch.
Stuart Broad and Chris Woakes, who took the key wicket of Younus Khan for 31 early on, claimed three wickets each as England fought their way back into the match.
The four-match series is tied 1-1.
Brief scores
England - 297 (Ballance 70, Moeen 63, Sohail 5-96) and 120/0 (Cook 64*, Hales 50*)
Pakistan - 400 (Azhar 139, Aslam 82, Misbah 56, Woakes 3-79, Broad 3-83)
Status - England lead by 17 runs