Openers put Pakistan in sight of victory in Bangladesh
Pakistan's Abid Ali (R) plays a shot as Bangladesh's wicketkeeper Liton Das watches on the fourth day of the first Test cricket match between Bangladesh and Pakistan
Set a target of 202, the visitors reached 109-0 at stumps and need only 93 runs on the final day on Tuesday.
Ali was batting on 56 at the end of the day's play, adding to his first-innings score of 133, while debutant Shafique was unbeaten on 53.
Fast bowler Shaheen Afridi earlier claimed 5-32 to help Pakistan bowl out Bangladesh for 157 runs in their second innings despite wicketkeeper-batsman Liton Das making a fighting fifty.
Resuming on 39-4, Bangladesh looked down and out once they lost Mushfiqur Rahim in the first over of the day, before Liton, who struck a hundred in the first innings, hauled the hosts back to respectability with 59 off 89 balls.
Afridi trapped Liton leg-before and then had Abu Jayed out for a duck to complete his fourth five-wicket Test haul.
Off-spinner Sajid Khan, who finished with 3-33, wrapped things up by dispatching Taijul Islam.
The hosts had got off to a positive start with Mushfiqur hitting a boundary off the first ball of the morning, bowled by Hasan Ali.
But two balls later he left a wrong delivery and departed for 16 after Hasan struck off-stump.
Liton joined overnight batsman Yasir Ali to prevent further collapse.
Just when they looked ready to prosper, Afridi's low bounce hit the helmet of Yasir, who retired hurt after making 36.
Liton survived on 26 when he was given out, caught at short leg off Sajid Khan.
The replay showed that the ball only hit his pad and was going down the leg.
Sajid was rewarded for his persistence as he trapped Mehidy Hasan leg-before for 11.
Substitute Nurul Hasan replaced Yasir after Mehidy's dismissal and barely survived a strong caught-behind appeal just before lunch.
Nurul heaved one at long-on to Faheem Ashraf off Sajid after the break, getting dismissed for 15, and Pakistan took little time to take the remaining wickets.
Bangladesh have failed to defeat Pakistan in any of their 10 previous encounters.
Bangladesh vs Pakistan first Test scoreboard
Scoreboard at stumps on the fourth day of the first Test between Bangladesh and Pakistan at Zahur Ahmed Chowdhury Stadium in Chittagong on Monday:
Bangladesh first innings (Liton Das 114, Mushfiqur Rahim 91; Hasan Ali 5-51)
Pakistan first innings (Abid Ali 133, Taijul Islam 7-116 )
Bangladesh second innings (overnight 39-4)
Shadman Islam lbw b Shaheen 1
Saif Hasan c and b Shaheen 18
Najmul Hossain c Shafique b Shaheen 0
Mominul Haque c Azhar b Hasan 0
Mushfiqur Rahim b Hasan 16
Yasir Ali retired hurt 36
Liton Das lbw Afridi 59
Mehidy Hasan lbw b Sajid 11
Nurul Hasan c Faheem b Sajid 15
Taijul Islam st Rizwan b Sajid Khan 0
Abu Jayedc Rizwan b Afridi 0
Ebadot Hossain not out 0
Extras (b1) 1
Total (all out; 56.2 overs) 157
Fall of Wickets: 1-14 (Shadman), 2-14 (Najmul), 3-15 (Mominul), 4-25 (Shadman), 5-43 (Mushfiqur), 6-115 (Mehidy), 7-153 (Nurul), 8-157 (Liton) , 9-157 (Jayed), 10-157 (Taijul)
Bowling: Shaheen 15-8-32-5, Hasan 11-0-52-2, Faheem 8-3-16-0, Nauman 9-3-23-0, Sajid 13.2-1-33-3
Pakistan second innings
Abid Ali not out 56
Abdullah Shafique not out 53
Total (no wickets, 33 overs) 109
To bat: Azhar Ali, Babar Azam (c), Fawad Alam, Faheem Ashraf, Mohammad Rizwan, Nauman Ali, Hasan Ali, Shaheen Afridi, Sajid Khan
Bowling: Taijul 16-3-37-0, Ebadot 5-1-23-0, Mehidy 10-2-36-0, Jayed 2-0-13-0