Bangladesh need seven wickets on the final day to beat Afghanistan in the one-off Test after setting them a target of 479 runs in Abu Dhabi.
Afghanistan reached 132 for three at stumps on the fourth day, needing another 347 runs to win the match at the Zayed Cricket Stadium.
Bangladesh took two early wickets before Rahmat Shah and Sediqullah Atal steadied the innings with a partnership of 82 runs for the third wicket.
Ebadot Hossain broke the stand late in the day, dismissing Rahmat for 51 off 124 balls with a catch behind by wicketkeeper Litton Das. Atal was unbeaten on 35 at the close, with Afghanistan still facing a formidable chase.
Bangladesh declared their second innings at 372 for seven after Litton struck a century and Mehidy Hasan Miraz scored a half-century.
They took a first-innings lead of 106 runs after being bowled out for 346 and dismissing Afghanistan for 240.
Litton scored 102 off 115 balls, his seventh Test century, while Miraz remained unbeaten on 52 in the second innings. Mushfiqur Rahim and captain Najmul Hossain Shanto earlier laid the foundation with 81 and 82, respectively.
Litton and Miraz added 159 runs for the seventh wicket, ensuring Bangladesh built a substantial lead before the declaration.
Litton reached his century with a boundary off Qais Ahmad but fell in the following over to a bouncer from Selim Safi, prompting Shanto to declare the innings.
Afghanistan’s chase began poorly as Ebadot dismissed Abdul Malik for two with his first ball in the second innings. Hasan Mahmud then removed Shahidullah Kamal for 19, leaving them at 28 for two.
Ebadot, who also claimed 50 Test wickets during the match, finished the day with two wickets for 32 runs. Hasan took one for 31 as Bangladesh’s pace attack made early inroads before Rahmat and Atal resisted.
Litton also set a Bangladesh record for the most dismissals by a wicketkeeper in a Test match, reaching eight in the game and surpassing Khaled Mashud’s previous mark of seven.
Bangladesh will resume on the final day needing seven wickets to seal victory, while Afghanistan must score 347 runs to pull off an unlikely win.