A 181-run partnership between Sami Aslam and Azhar Ali has put Pakistan in control of the third Test against England at Edgbaston.
The tourists went into day two chasing a total of 297, and dominated with the bat to end on 257-3, just 40 runs short of their hosts.
Things started well for England when Mohammad Hafeez snatched at an average delivery from Jimmy Anderson, firing it straight to Jonny Bairstow on just the fourth ball of the day to leave Pakistan 0-1.
Any hopes that the hosts would carry their momentum from the second Test victory at Old Trafford soon faded away, though, as Aslam and Azhar began to build their partnership.
The duo were helped by a number of misfields along the way, most notably when Joe Root dropped Azhar at slip, but England finally found a second breakthrough when Aslam was run out by James Vince for 82.
Azhar went on to register his 10th Test century as he and Younus Khan almost saw out the rest of the session, only to then lose concentration on the very last ball of day, edging a Chris Woakes delivery to Alastair Cook.
The number three walked back to the pavilion cursing himself for falling at the final hurdle, but also having put his side on course for victory with a knock of 139.