On a beautiful summer's day in London, Pakistan made the England bowlers pay as they piled on the runs during the day. The fightback was led by Asad Shafiq who made 109 and Younis Khan who ended the day 101 not out.
The visitors will return tomorrow hoping to build a big first innings lead with the four remaining wickets that they have left.
Yasir and Azhar frustrate England
The visitors started the day on three for one with Yasir Shah and Azhar Ali at the crease.
The pair started the first session well, frustrating the English bowlers who couldn't get a breakthrough in the first hour of play.
The partnership though was finally broken on 49 when Steven Finn was introduced into the attack as he removed Yasir for 26 to get a much-needed wicket for his team.
The wicket of Yasir brought Shafiq to the crease, who received a promotion up the order from number six and he quickly got into his stride.
Shafiq and Azhar put on 75 for the third wicket
Alongside Azhar, Shafiq saw the visitors through to lunch on 97 for two. Azhar was 36 not out and Shafiq was 24 not out as the hosts were 231 runs behind England's first innings score.
After lunch, Azhar and Shafiq took their partnership past fifty as they made the hosts toil in the sunshine.
The partnership was finally broken though on 75 when Moen Ali got the wicket of Azhar for 49 caught behind.
Younis and Shafiq score centuries to give Pakistan a lead
This then brought Younis to the crease who was short of runs so far on tour.
Shafiq though was still looking good at the crease and he brought up his half-century midway through the afternoon session.
Younis then started to settle in well at the crease as he and Shafiq took their partnership past fifty to reach tea on 196 for three. Shafiq went to tea 79 not out and Younis 26 not out.
The pair resumed after tea and made the English bowlers pay for bad bowling as they took their partnership past 100 and they were intent on keeping it going.
Younis was now in supreme control as he for the first time in the series went passed fifty and wanted to make a statement now that he was set.
Shafiq at the other end wasn't doing too bad as he was next to bring up a landmark scoring his ninth test century after tea which he deserved after batting so well.
England were striving for a wicket and it finally came when Finn got his second wicket of the innings, removing Shafiq for 109 thanks to a stunning catch from Stuart Broad. The fourth wicket partnership was finally broken on 150 to leave the score on 277 for four.
The wicket of Shafiq brought Pakistan captain Misbah-ul-Haq to the crease and he alongside Younus started to build a good partnership before the end of the day's play.
Woakes takes two late wickets to give hosts some hope of limiting the lead
The partnership though was broken on 39 when Chris Woakes returned to the attack with the new ball and he got the big wicket of Misbah for 15 before removing debutant Iftikhar Ahmed in the same over for four to leave the score on 320-6.
Younis though was still at the crease for the visitors and he brought up his 32nd test century before the end of play to finally regain some of his best form that had been missing in the series.
Sarfraz Ahmed joined Younis at the crease and the pair saw their side to the end of the day's play on 340-6. Younis will return on day three 101 not out while Sarfraz will return 17 not out.