Mushfiqur Rahim fell agonisingly short of a double hundred but Bangladesh racked up 565 all out in reply to Pakistan's first innings total of 448-6 declared on day four of the opening Test in Rawalpindi on Saturday.
Mushfiqur made 191 and forged a 196-run stand with Mehidy Hasan Miraz (77) for the seventh wicket as Bangladesh posted their highest total against Pakistan in the batsman-dominated contest at the Rawalpindi Cricket Stadium.
Bangladesh number eight Miraz became the fifth batter to score 50 or more in their innings as more than 1,000 runs were scored over four days while 17 wickets fell.
Pakistan finished the penultimate day on 23-1, trailing by 94 runs, after losing opener Saim Ayub cheaply.
Abdullah Shafique was batting on 12 with captain Shan Masood on nine at the other end.
"We did not expect the wicket to be so slow," Pakistan assistant coach Azhar Mahmood told the broadcasters.
"It was a hot day but still credit to our bowlers who ran in hard and gave their best."
The unresponsive pitch appeared to disarm Pakistan's otherwise formidable new ball attack of Shaheen Afridi and Naseem Shah.
After Bangladesh resumed on 316-5, Naseem (3-93) removed Litton Das (56) but Mushfiqur and Miraz batted resolutely to avoid any collapse.
Mushfiqur's application was top notch as the diminutive 37-year-old brought up his 11th Test hundred and soldiered on.
Mohammad Ali denied Mushfiqur a double hundred when he had the batter caught behind after a sparkling knock that included 22 fours and a six.
Miraz put Bangladesh in the lead and hit six fours before Afridi sent him back.
1st Test: Kamindu, Chandimal lead Sri Lanka's recovery
Afridi's heartwarming celebration for his newborn son
Centurion Jamie Smith breaks English record
Approve Of Shami's New Look?
Dhawan's heartfelt note on retirement