Liton Das and Mushfiqur Rahim hit fifties to help Bangladesh rebuild the innings after a top-order collapse in the first Test against Pakistan in Chittagong on Friday.
Liton was on 62 alongside Mushfiqur on 55 at the tea break, guiding Bangladesh to 171-4 on the first day in Chittagong.
Opting to bat first, the hosts looked in all sorts of trouble at 49-4 before the duo turned the tide.
Liton led the charge, hitting seven fours and hoisting off-spinner Sajid Khan over long on for his only six in the innings.
He struck left-arm spinner Nauman Ali to bring up his 10th Test fifty before Mushfiqur followed suit, his 24th in Tests, with a four off Hasan Ali.
Pakistan's bowlers had dominated the opening session as Shaheen Afridi, Hasan Ali, Faheem Ashraf and Sajid each claimed a wicket.
Afridi set the tone for Pakistan with a gem of a delivery in the fifth over that rose sharply to glance off opener Saif Hassan's bat to Abid Ali at short leg. He made 14.
Hasan Ali then trapped the other opener, Shadman Islam, leg-before for 14.
Bangladesh skipper Mominul Haque fell soon afterwards, scoring just six as Sajid spun one sharply to take an edge that was gladly accepted by wicketkeeper Mohammad Rizwan.
The umpire initially declared Mominul not out but the decision was overruled on review.
Najmul Hossain got off the mark with a four but he too soon perished, cutting a Faheem delivery straight to Sajid at point.
Pakistan handed batsman Abdullah Shafique a Test debut while Yasir Ali was making his Test bow for Bangladesh in the two-match series.
Check out the latest videos from DH: