At stumps, Pakistan were 321 for nine with Azhar having scored 73 and Fakhar 71, the openers sharing a stand of 121 in an innings where Usman Salahuddin made 69.
The match is Pakistan's last before they face England at Lord's on Thursday in the first of a two-Test series.
Azhar's innings was especially encouraging after he twice fell cheaply, for four and two, in Pakistan's five-wicket win over debutants Ireland in last week's stand-alone Test at Malahide, Dublin.
The 33-year-old Azhar, whose 63 Tests have yielded 14 centuries, appears inked in to open against England alongside the in-form Imam-ul-Haq, rested from the Leicestershire game.
Fakhar, whose blazing century helped Pakistan beat arch-rivals India in last year's Champions Trophy one-day final at The Oval, has yet to make his Test debut.
First Published: May 20, 2018, 9:40 AM IST