Younis Khan and Azhar Ali struck centuries to punish a sloppy Bangladesh and power Pakistan to a strong 323 for three on the first day of the second and final Test.
Younis (148) fell to the second new ball, having added 250 for the third wicket with Azhar (127*) as Pakistan laid the foundation for an imposing first-innings total.
Captain Misbah-ul-Haq was unbeaten on nine at stumps.
Bangladesh captain Mushfiqur Rahim opted to field but the hosts suffered an early jolt as paceman Shahadat Hossain limped off after the second delivery of the match with an injury.
Left with a depleted attack, Bangladesh still managed to send back openers Mohammad Hafeez (eight) and Sami Aslam (19) early to reduce Pakistan to 58 for two but let the visitors off the hook by overstepping on crucial deliveries.
Azhar was caught at slip on 18 but was saved when replays showed bowler Mohammad Shahid's front foot had not landed behind the crease.
Younis also got a reprieve on 78 when he was caught at short cover but part-time medium paceman Soumya Sarkar was found to have overstepped.
The 37-year-old Younis was the more fluent of the pair, putting the sweep shot to good use against the spinners and was the first to reach triple figures, his 29th in Tests, with a square drive for two off Sarkar.
Pakistan's 50-over captain Azhar lofted left-arm spinner Taijul Islam for a four to bring up his eighth Test hundred.
Bangladesh blanked Pakistan 3-0 in the ODI series and also won the lone Twenty20 match before drawing the first Test at Khulna, despite conceding a huge first innings deficit.
Pakistan 323-3 (Younis 148, Shahid 2-43)