Bangladesh took control of the one-off Test against Afghanistan on Sunday.
The Tigers extended their lead to 329 runs at stumps on the third day with four wickets in hand.
Fast bowler Hasan Mahmud stole the spotlight in the morning, taking a hat-trick as Afghanistan collapsed from 211-4 overnight to 240 all out.
Hasan finished with 5-55, while Ebadot Hossain claimed four wickets. Hasan became the first Bangladesh fast bowler to take a Test hat-trick and the third Bangladeshi overall to achieve the feat.
Afghanistan captain Rahmat Shah scored 105 not out, becoming the first player to score a century on his Test captaincy debut against Bangladesh.
Holding a 106-run first-innings lead, Bangladesh lost openers Sadman Islam (13) and Mominul Haque (7) before lunch. Tanzid Hasan made 31 but fell after the break, leaving Bangladesh at 53-3.
Mushfiqur Rahim and Najmul Hossain Shanto then steadied the innings with a 159-run partnership. Both scored 80s, with Mushfiq making 81 and Najmul 82, but neither converted his start into a century.
Bangladesh suffered a late collapse, losing three wickets in five overs before stumps. Hasan was dismissed for a duck, leaving the hosts at 297-6.
Despite the late setbacks, Bangladesh remain firmly in control, with a big lead and four wickets in hand heading into the fourth day.