Afghanistan yet again came close to a victory against a top-Asian team but faltered in finishing, losing plot in the last 10 overs of the chase.
They needed eight runs off the final over but the experienced pacer Mustafizur conceded only four and also dismissed the dangerous Rashid Khan (5).
Afghanistan looked well in control with Hashmatullah (71) and captain Asghar Afghan (39) going very strong after losing three wickets.
They stitched a 78-run partnership for the fourth wicker but the Bangladesh skipper Mashrafe Mortaza dismissed both to puncture Afghanistan hopes.
Mohammad Nabi (38) and Samiullah Shenwari (23 not out) produced a quick-fire 46-run stand for the sixth wicket but that was not enough as they ended with 246 for seven, while chasing 250.
Mahmudullah (74) made it memorable match for himself. After batting well at crucial juncture, he dismissed Afghanistan opener Mohammad Shahzad (53) and also took a catch of the rival skipper.
Bangladesh now need to beat Pakistan on Wednesday to qualify for the summit clash.
Afghanistan bowlers could not capitalise on a dominant start upfront and allowed Bangladesh to score a competitive 249 for seven with Mahmudullah and Imrul Kayes repairing the innings with fighting half-centuries.
Mahmudullah and Kayes (72 not out), playing his first ODI in almost a year, shared a 128-run stand for the fifth wicket to lift their side from a precarious 87 for five after electing to bat.
The inexperience of Afghan bowlers showed yet again as they allowed the rivals to free themselves from their clutches.
Mahmudullah played aggressive after completing his 20th ODI, twice lofting star Afghan spinner Rashid Khan over the ropes.
Rashid was well handled by the two batsmen. He could get only one wicket today and gave away 46 runs in his 10 overs. It was key in Bangladesh's revival.
Mahmudullah's knock came off 81 balls with three fours and two sixes while left-hander Kayes consumed 89 balls for his calculative unbeaten knock, which had six shots to the fence.
The partnership broke towards the end of the innings when pacer Aftab Alam had Mahmudullah caught by Rashid.
At the top, only Liton Das could make his presence felt with a 41-run innings while Mushfiqur Rahim (33) frittered away a good start by running himself out.
The pace trio of Aftab Alam, Mujeeb Ur Rahamn and Gulbadin Naib had succeeded in straight-jacketing Bangladesh batsmen, keeping them under a tight leash with disciplined line and length.
Alam got the better of Nazmul Hossain (6) while Mohammad Mithun (1) was done in by Mujeeb Ur Rahman.
Boundaries were far and few. Making it tougher for the Bangladesh was some terrific fielding by the gritty Afghans.
After the top-order was removed, run outs of Shakib ul Hasan (0) and Rahim only added to their woes.
However, Mahmudullah and Kayes ensured that the minnows do not take advantage of a brilliant start.
asia cupAsia Cup 2018Bangladesh vs AfghanistanImrul KayesmahmudullahMohammad MithunMohammad NabiMujeeb Ur Rahamnmustafizur rahmanRashid KhanSamiullah Shenwarishakib al hasan
First Published: September 24, 2018, 9:41 AM IST