Mohammad Hafeez led Pakistan's strong reply with his third hundred in as many Tests after Bangladesh lost their last five wickets for 27 runs on the second day of the opening Test at Khulna.
Hafeez remained unbeaten on 137 with Pakistan reaching 227 for one in their first-innings at stumps after Bangladesh were shot out for 332. Azhar Ali was also not out on 65.
Bangladesh resumed on Wednesday on 236 for four and went past 300 riding on a 62-run stand for the sixth wicket between captain Mushfiqur Rahim (32) and debutant Soumya Sarkar (33).
Sarkar and Rahim fell in consective overs as Bangladesh, who defeated Pakistan in all four limited overs matches preceding the two-Test series, collapsed from 305 for five to 332 all out.
Paceman Wahab Riaz and leg-spinner Yasir Shah finished with three wickets each for Pakistan.
Hafeez, who also picked up two wickets, added 50 for the opening wicket with debutant left-hander Sami Aslam (20), who was given out caught-behind off Taijul Islam after Mushfiqur successfully reviewed the umpire's not-out verdict.
Mushfiqur, however, dropped Azhar on 11 and 28, the second one forcing him to leave the field with an injured finger.
Hafeez, who successfully overturned the umpire's caught behind decision against him on 13, brought up his eighth Test century with two consecutive fours off paceman Rubel Hossain before taking off his helmet and kissing the turf to celebrate the mark.
The 34-year-old right-hander had scored 96, 101 not out, 197 and 24 in his last four innings in tests against New Zealand in UAE in November.
Bangladesh 332 all out (Haque 80, Riaz 3-55)
Pakistan 227-1 (Hafeez 137*, 1-43)