Teenage paceman Naseem Shah removed Bangladesh opener Saif Hassan to give Pakistan an early breakthrough after the home team put on a big 212-run lead in the first Test on Sunday.
Fighting to save the Test, Bangladesh were 51-1 at tea on the third day, with opener Tamim Iqbal on a confident 32 and Najmul Hossain Shanto on three.
Bangladesh, who scored 233 in their first innings, still need another 161 to avoid an innings defeat with nine wickets intact.
Pakistan were bowled out for 445 in their first innings with Babar Azam scoring 143 and Haris Sohail 75.
Saif, playing his first Test, was on a pair after his second ball duck in the first innings but he started confidently to reach 16 with four boundaries before he was bowled by Naseem.
Iqbal, fresh from scoring the highest first class score on Bangladeshi soil of 334 not out last week, has so far hit six boundaries.
More From This Section
Earlier, Pakistan lost seven wickets on either side of lunch with Sohail holding the innings.
Sohail, whose position was in danger after consistent failures, hit seven fours and two sixes in his third Test half century before he holed out off spinner Taijul Islam to deep mid-wicket.
Last man Naseem was run out to end Pakistan's first innings.
- Holiday crowd -
=================