Azhar Ali hit a maiden double-century as Pakistan reached 557 for eight by tea on the second day of the second and final Test against Bangladesh in Dhaka on Thursday.
Azhar scored a career-best 226 and Asad Shafiq made 107 during a fifth-wicket stand of 207 before Pakistan lost four wickets in the space of 27 runs just before tea.
Off-spinner Shuvagata Hom removed Azhar and Shafiq in successive overs, both batsmen falling to catches on the long-off fence by Mohammad Mahmudullah.
Left-arm spinner Taijul Islam dismissed Wahab Riaz and also sent back Yasir Shah off the last ball before tea to leave Sarfraz Ahmed unbeaten on 21.
Pakistan lost skipper Misbah-ul Haq in the day's second over, bowled by Shakib Al Hasan for nine, before a run had been added to the overnight score of 323 for three.
Younis Khan had made 148 on the first day after Bangladesh captain Mushfiqur Rahim won the toss and elected to field at the Sher-e-Bangla stadium.
The first Test ended in a draw in Khulna last week.