Bangladesh 239 (Mushfiqur 99, Mithun 60, Junaid 4-19) beat Pakistan 202 for 9 (Imam 83, Mustafizur 4-43) by 37 runs

In the end, this loss might come as a minor relief for Pakistan. It can only be an indictment of the format and schedule of the tournament that a side could play so poorly and still be one game from a shot at the title. Pakistan, barely able to cling a performance together, finally had their flickering hopes of an unlikely Asia Cup triumph extinguished by a Bangladesh team that, on the day, simply did what needed doing with ruthless efficiency, dispatching Pakistan by 37 runs, and securing a final date with India.

They had two men at opposite ends of their careers to thank for it, an epic rescue act from Mushfiqur Rahim followed by Mustafizur Rahman's figures of four for 42 sending Sarfraz Ahmed's men crashing out of a tournament they never really took off in.

For all of the strides Bangladesh have made in limited-overs cricket over the years, this was still an exceptionally gallant effort from Mashrafe Mortaza's men. They came into the match having just learned their talisman Shakib al Hasan would play no further part in the tournament. Tamim Iqbal hadn't been available since the first game. Mashrafe himself would be limited halfway into the Pakistan innings, having injured himself taking a screamer at midwicket to effect arguably the most important dismissal of the match - that of Shoaib Malik.

This was no full-strength Bangladesh, but they made up for it with calculated, intelligent cricket, and an understanding that, in these conditions, they could play to their strengths.

Chasing 240, Pakistan were slight favourites at the halfway mark, but Bangladesh gave them a taste of their own medicine, reducing them to 18 for 3 in the first four overs. Mustafizur was brilliant in the early overs, arguably the only one all tournament to get the new ball to move around occasionally. His variations were judged to perfection; he seemed to understand the Pakistan batsman's psyche better than they did themselves. Both Babar Azam and Sarfraz failed to read the cutters, paying the price with their wickets and exposing Pakistan's famously fragile middle order within the first five overs.

Imam-ul-Haq struck up a couple of attritional partnerships with Malik and Asif Ali that kept Pakistan dreaming until the last ten overs, but in truth, they were never really ahead in the game after that opening burst. Imam's innings didn't have the fluency of Mushfiqur's, nor its conviction and confidence. Bangladesh's spinners, ideally suited to strangulating teams mid-chase, followed the template to perfection. A wicket every few overs gave Pakistan a bloody nose, allowing the young Mustafizur, already looking like a leader at 23, to return to deliver the knockout blow. He stomped on any outlandish hopes Pakistan might have continued to harbour, removing Mohammad Nawaz and Hasan Ali - key bit-part players in the chase against Afghanistan - in quick succession, and from there on, all Pakistan could do was delay the inevitable.

It had looked like a different script at the start of the match, a brilliant start by Junaid Khan and Shaheen Afridi reducing Bangladesh to 12 for 3. It left Mushfiqur needing to pull off another rescue act, and true to reputation the diminutive wicketkeeper set about that task with the grim determination that has defined his career, a 144-run partnership with Mohammad Mithun helping Bangladesh climb out of that mess and put up 239, a total they would have happily signed up to after a nightmarish first seven overs.

Mushfiqur himself was desperately unlucky to fall a run shy of another hundred, becoming the first Bangladesh cricketer to ever be dismissed on 99 in international cricket. It wasn't just the statistical landmark he missed out on; with his dismissal, Bangladesh's hopes of putting up a total in excess of 250 all but evaporated.

Pakistan had much to thank Junaid for. Given his first start of this tournament, the left-armer put in Pakistan's best fast-bowling performance with figures of 9-1-19-4.

No international side's middle order has made a greater proportion of their team's runs since the start of 2017 than Bangladesh's, and one can see why in games like these. There's an argument to be made that Mushfiqur bats too low in this line-up, especially since neither Shakib nor Tamim are playing, and he looked his side's best batsman by a distance, guiding his side away from the cliff edge, and helping Mithun grow in confidence around him.

Once they saw off the initial burst, they began to look comfortable very quickly. Sarfraz, a man under pressure on many fronts over the past few days, didn't have his best day as captain, taking off Afridi and Junaid after just four overs each. They were the only bowlers that threatened to take wickets in that first phase, and once the out-of-form Hasan Ali conceded seven runs off his first over, the partnership was underway.

Pakistan's field was another point of contention, Sarfraz never sure whether he wanted first slip in or not. Several edges went through that position, but never when the man was in.

The case for a defensive field was particularly flimsy given how much pressure Bangladesh were under, and Mushfiqur's experience allowed him to take his chances as his side clawed its way back to parity.

Pakistan's spinners lacked penetration, as they have done all tournament, allowing the fourth-wicket partnership to continue building, threatening to take the contest away from Pakistan. It wasn't until the quicker bowlers were reintroduced that a breakthrough came, with a short delivery from Hasan Ali coaxing a top edge from Mithun, allowing him to complete the simplest of catches.

From there on, the faster bowlers continued to chip away at the lower middle order, and dismissals kept stymieing Bangladesh's ambitions of setting a total they would truly be confident of defending. Junaid returned to bowl just as spectacularly as he had begun the day, taking two more wickets and enjoying perhaps his best performance in a Pakistan shirt since recovering from the debilitating knee injury that hampered his career for so long. Afridi at the other end played his part as Bangladesh fell apart at the end, losing their last four wickets for 18 runs.

It might have looked a bit shy at that point, but Mustafizur and the spinners were about to take over, and ensure Mushfiqur's efforts wouldn't go in vain. While they look ahead to the ultimate glory against India, the recriminations in Pakistan could be severe indeed.

Danyal Rasool is a sub-editor at ESPNcricinfo. @Danny61000