After a hard day of toil, Pakistan were 9-2 in their second innings at stumps for a slender lead of 21 as they bid to level the two-match series after losing the first Test by 10 wickets.
Bangladesh's Litton Das hit a defiant 138 and Mehidy Hasan Miraz 78 as the tourists recovered from a precarious position to post 262 all out after Pakistan's Khurram Shahzad bagged six wickets on the third day of the second Test at Rawalpindi on Sunday.
Responding to Pakistan's first innings 274, Bangladesh were reduced to 26-6 and in danger of following on amid fiery fast bowling in the morning but Das and Miraz put together a 165-run stand for the seventh wicket to steady the ship.
Das hit 13 fours and four sixes in his 228-ball knock while Miraz, who claimed five wickets to skittle out Pakistan, showed his ability with the bat by hitting 12 fours and a six.
After a hard day of toil, Pakistan were 9-2 in their second innings at stumps for a slender lead of 21 as they bid to level the two-match series after losing the first Test by 10 wickets.
Hasan Mahmud dismissed Abdullah Shafique and bowled night-watchman Shahzad on the final ball of the day.
Earlier, Bangladesh resumed on 10 for no loss having kept Pakistan quiet on Saturday after the opening day was washed out but they came under intense pressure immediately.
Generating plenty of pace and swing early on, Shahzad (6-90) got rid of Zakir Hasan and castled Shadman Islam and skipper Najmul Hossain Shanto in his next over while Mir Hamza also joined in with two quick strikes.
Shahzad trapped the experienced Shakib Al Hasan lbw to leave the shell-shocked tourists in dire straits, still needing 98 runs to avoid the follow-on.
However, Miraz and Das staged a remarkable fightback from there as they guided Bangladesh to 75-6 at lunch and milked the Pakistan bowlers to bring up their half-centuries.
Shortly after hooking Shahzad for a huge six to take their partnership past 150 runs, Miraz offered the pace bowler an easy catch but Das kept going and brought up his fourth test century to frustrate Pakistan.