England counter-attacked impressively to hold a 17-run lead at the close of play on day three of the third Test against Pakistan at Edgbaston.
Having bowled the tourists out for 400 in Birmingham, both of the hosts' openers notched half centuries and remained unbeaten at stumps, skipper Alastair Cook making 64 and Alex Hales reaching 50 to put on 120 without loss as the pair produced a century partnership for the first time in their 18th innings together.
Earlier, resuming at 257-3 with Younis Khan (31) joined at the crease by Misbah-ul-Haq, Pakistan set about building on their strong showing in the first two days of the Test, when they dismissed England for 297.
They were assisted by the enforced removal from the bowling line-up of James Anderson (2-54), who entered the pitch during his follow-through, albeit only just, for the third time in the innings.
The leader of England's attack had been forced to apologise on Thursday for verbally abusing the umpires after receiving his first two warnings.
Misbah managed a half century of 56 and Sarfraz Ahmed contributed a dogged 46 as the tourists' middle order and tail battled to take advantage of earlier hard work.
Younis was the first to depart, edging Chris Woakes (3-79) down the leg side to Jonny Bairstow, having added just 10 runs from his overnight score.
Asad Shafiq went for a duck after failing to block a straight ball from Stuart Broad (3-83).
The departure after lunch of Misbah, who guided an Anderson delivery onto his stumps, triggered a slump, with four wickets falling in the space of eight overs.
Yasir Shah (7) was run out trying for a second off a pull through square, Woakes fielding and Bairstow smartly removing the bails with his elbow.
A review did for Mohammad Amir (1) in the next over, he fell lbw to a Woakes effort destined to hit middle and leg, Bruce Oxenford's initial call having been overturned by TV umpire Kumar Dharmasena.
Sohail Khan (7) was then unsuccessful in his appeal against an lbw decision, having been trapped by Broad attempting to clip a shot down the leg side.
And it was Broad who finally ended Pakistan's frustrating resistance, tempting Rahat Ali (4) into an edge that Joe Root caught at second slip.
While it may have taken England longer than they would have hoped to clean up the visitors' tail, Cook and Hales produced an assured display late in the day, racking up 16 boundaries between them to leave Pakistan's four-man attack empty handed and the match intriguingly poised.