Teenage quick Naseem Shah has given Pakistan an early breakthrough after Haris Sohail's half century earned the home team a 212-run lead in their first Test against Bangladesh.
The 16-year-old, who hit the headlines for his pace when he made his debut against Australia last year, clean bowled debutant Saif Hassan (16) off a delivery that stayed low as Bangladesh moved to 1-51 at tea on the third day.
The visitors still trail by 161 runs after their seamers claimed Pakistan's last seven wickets for 103 runs and dismissed the home team for 445.
Tamim Iqbal, who had scored a triple century in a domestic first class match before arriving in Pakistan last week, was batting on 32 while Najmul Hossain Shanto was on 3 at the break.
Earlier, Haris' counter-attacking 75 off 103 balls helped Pakistan stretch their lead past the 200-run mark after the home team resumed from its overnight 3-342.
Bangladesh's bowlers offered much more disciplined line and length with the second new ball with Pakistan all out an hour into the second session.
The three seamers - Abu Jayed (3-86), Rubel Hossain (3-113) and Ebadot Hossain (1-97) - shared the bulk of wickets with Pakistan's lower order crumbling.
Haris hit seven fours and two sixes before he was the ninth batsmen to be dismissed when he holed out in the deep while attempting a big shot against the left-arm spin of Taijul Islam, who finished with 2-139.
Earlier, Bangladesh hit back with four wickets as the hosts lost century-maker Babar Azam off Jayed's first ball of the day before reaching 7-420 at lunch.
Rubel claimed the wickets of Mohammad Rizwan (10) and Yasir Shah (5) in Bangladesh's most productive session of the match as Pakistan could only add 78 runs.
Babar, who scored 143 off 193 balls and hit 18 fours and a six during his nearly 4-1/2 hours at the crease, was taken at first slip when caught in two minds whether to leave the ball or to cut the rightarm seamer Jayed.
Ebadot induced an inside edge of Asad Shafiq's bat off a delivery that nipped back as Pakistan lost their two set batsmen within the first hour.
Shafiq made 65 off 129 balls, hit nine fours and added 112 runs in a fourth-wicket stand with Babar.