Bangladeshi left-arm spin duo Shakib Al Hasan and Taijul Islam made quick work of Ireland's top order on Wednesday to leave the tourists flailing at 27-4 on day two of their one-off test in Dhaka.
Mushfiqur Rahim's knock of 126 put the hosts on the front foot after early wobbles in the first innings and the hosts were still 128 runs ahead at stumps.
Andy McBrine claimed 6-118, becoming only the second Irish bowler to take five test wickets, to help close out the first innings in the final session.
But Ireland's batsmen spoiled his party with four quick wickets before the day was done.
Murray Commins (1), James McCollum (0), Andy Balbirnie (3) and Curtis Campher (1) wilted in front of Taijul and Shakib, who claimed 2-7 and 2-11 respectively.
Herry Tector was batting on eight alongside Peter Moor, 10 not out at the end of play to leave Ireland staring at the prospect of an innings defeat.
Bangladesh resumed on 34-2 and looked shaky after losing Mominul Haque, bowled round his legs for 17, in the third over of the morning.
But Shakib and Mushfiqur turned up the aggression to quickly claw back the deficit with a 159-run partnership for the fourth wicket.
Shakib was at his mercurial best until he chased a ball from McBrine wide outside the off stump to get a feather touch on the bat.
He was caught behind after an impressive 14 fours from his 94-ball knock. Liton Das joined Mushfiqur to continue on the front foot, adding 87 runs for the fifth wicket.
Mushfiqur finished his hundred from 135 balls with a four off Mark Adair before Ben White dismissed Liton for 43 runs.
McBrine finally dispatched Mushfiqur – with Commins taking a fine diving catch at long-on – and cut short the tail with three wickets in three consecutive overs.
Ireland have lost all three of their previous tests since becoming a full member of the International Cricket Council in 2017.