Pakistan made a strong reply and reached 145 for no loss after fast bowler Hasan Ali claimed 5-51 to dismiss Bangladesh for 330 on day two of the opening test on Saturday.
Openers Abid Ali and debutant Abdullah Shafique played out the second and third sessions comfortably in a good batting track to cut the deficit to 185 runs.
Abid, who reached the 1,000-run mark in his 15th test, closed in on his fourth century, remaining unbeaten on 93 at stumps, owing to bad light. Shafique overcame a nervy start to finish the day on 52 not out.
"We are in good position now and will try to take it session by session," Ali said.
"Our first target is to go past Bangladesh’s 330 and then we will try to take a big lead to give our bowlers an advantage."
Abid struck the first three boundaries when Shafique struggled to get off the mark.
Shafique flicked through midwicket for four off pacer Abu Jayed and grew with confidence.
Abid was fluent in his approach and glanced offspinner Mehidy Hasan for a couple to reach his third half-century off 84 balls.
Shafique brought up his half-century in style, clubbing occasional bowler Mominul Haque for the maximum.
Bangladesh’s hope of racking up a substantial total was dashed by fast bowler Hasan Ali earlier.
Ali broke Bangladesh’s resistance in the first session as the home side resumed on 253-4.
He alone took four wickets on day two with Bangladesh adding just 77 runs for the rest of the six wickets.
Ali's sixth five-for was well-complemented by his new ball partner Shaheen Shah Afridi who returned figures of 2-70 and medium pacer Faheem Ashraf, 2-54.
For Bangladesh, Liton Das top-scored with 114 after hitting his maiden century and Mushfiqur Rahim added 91. Mehidy Hasan was not out on 38.
Liton, starting the day with 113, added just one run before Ali had him leg-before, which the umpire disagreed, only for the decision be overturned on review.
"At this moment, Pakistan is dominating the game but we still have the chance to hit back,” Liton said. “We need to take some wickets quickly tomorrow and only then we can keep pressure on them.”
Debutant Yasir Ali spent some nervy moments in the crease and survived a leg-before review by Pakistan.
However, he got off the mark in international cricket with a cover-drive four off Afridi on the 14th ball he faced.
But Ali tested him with short balls and finally rattled him stump with a delivery that jagged in sharply.
Bangladesh relied on overnight unbeaten Mushfiqur to take the side to safety and he grew with confidence, hitting Afridi for a boundary through backward point.
Medium pacer Ashraf moved the ball nicely to coax an edge from him as Mushfiqur, who reviewed the decision in vain, fell nine runs short of his eighth century.
After losing three wickets for just 23 runs, the much-needed resistance came from Mehidy Hasan who guided lower order amid the well directed short ball barrage of Afridi and Ali.
Hasan Ali cleaned up the tail to bring an end to the innings.