Asad Shafiq and Younis Khan hit centuries to ensure Pakistan were 12 runs ahead with four wickets in hand at the end of Friday's play in the final Test.
With Pakistan needing victory to draw the series, Shafiq's patient innings of 109 was crucial in setting up a winning position for the tourists as England dropped three catches but battled back late in the day.
Younis took up the mantle with a bullying unbeaten 101, but Chris Woakes (2-52) claimed the key wicket of captain Misbah-ul-Haq (15) with the second new ball to open the door for England.
Just one wicket fell in Friday's early session, with England frustrated in their attempts to dismiss the determined night-watchman Yasir Shah (26), who was eventually caught by Joe Root off the bowling of Steven Finn (2-71).
Yasir was earlier dropped by Alex Hales - fined 15 per cent of his match fee following the dissent he showed after he was caught by the spinner on Thursday - and England rued missed opportunities.
Anderson (0-58) dropped a tough chance to remove Shafiq for seven and Finn missed a sharp caught-and-bowled chance to take Azhar Ali, whose wicket was taken by Moeen Ali (1-83) for 49.
Shafiq made England pay, smashing Moeen for six twice as he progressed to his ninth Test century, on his promotion to three in the Pakistan order after recording two ducks at Edgbaston.
Anderson nearly had Shafiq caught behind on 99 as he chased a wide delivery, before a nudge to mid-on brought up three figures and Younis also attacked Moeen, with a glorious straight six the highlight of the veteran's classy knock as he played himself back into form.
Shortly after the 150 partnership was brought up, Shafiq was spectacularly caught by Stuart Broad (1-59) off Finn's bowling to give England hope.
Woakes was handed the second new ball and he got skipper Misbah, before Moeen took a stunning catch to take debutant Iftikhar Ahmed in the same over, the in-form all-rounder moving to 25 wickets for the series.
The irrepressible Younis recorded his 32nd Test hundred shortly afterwards, bending to kiss the pitch, although there were no push-ups on this occasion, and the game remains in the balance.