Spinner Taijul Islam claimed four wickets as Bangladesh moved within three wickets of a series sweep against Pakistan on day four of the second Test in Sylhet.
Chasing an improbable 437 for victory, Pakistan were reduced to 7-316 by stumps on Tuesday.
No.7 batter Mohammad Rizwan, on 75, was the last realistic hope for the visitors, with Sajid Khan with him on eight.