Sri Lanka edged Bangladesh in a final over thriller to qualify for the Super 4 stage of the Asia Cup at the Dubai International Stadium on Thursday, winning with two wickets and four balls to spare.

Kusal Mendis rode his luck, let off five times by Bangladesh, on course to his seventh T20I half-century and a top score of 60, with Sri Lanka captain Dasun Shanaka making 45 off 33 balls to keep his in the game.

Shanaka’s wicket in the 18th over, with Sri Lanka, needed 26 off 13 balls, appeared to put Bangladesh ahead of the game, though Chamika Karunaratne brought that equation down to 13 for 8 before he was run out for 16.

Fast bowler Asitha Fernando then cracked a boundary off the final ball of the 19th over, reducing the equation to eight runs from six balls, before another boundary from Fernando on the second ball of the final over left Sri Lanka needing three runs from four deliveries.

Fernando them drove the next delivery down to long on to level the scores, before the third umpire indicated that Mahedi Hasan had overstepped, effectively giving Sri Lanka the win.

That no ball was one of four bowled by the Bangladeshis, who conceded a total of 17 extras.

One of those no balls also gave Mendis a reprieve, when he was given out caught behind on 29, replays confirming that Hasan had overstepped.

Sri Lanka plundered 44 in five overs at the start of their innings, with Mendis scoring two sixes and a four off Shakib Al Hasan in the fifth over.

Bangladesh would end the Powerplay slightly ahead however, with debutant Ebadot Hossain taking the wickets of Pathum Nissanka and Charith Asalanka in the sixth over.

By the end of the tenth over, Sri Lanka were barely keeping abreast, losing Danushka Gunathilaka and Bhanuka Rajapaksa cheaply, even as Mendis continued to ride his luck.

A 54-run parentship between Mendis and Shanaka took Sri Lanka to 131 for 4 after 14.2 overs, before the former picked out the fielder at third man, dismissed for 60.

Wanindu Hasaranga was caught for 2, leaving Shanaka as Sri Lanka’s best hope for victory, and the captain looked up for it, until he was caught in the deep for 45.

Mehidy Hasan gave Bangladesh a quick start, with 38 off 26 deliveries, before Afif Hossain scored a sprightly 39 off 22 balls to help his team finish on 183 for 7 in 20 overs – their highest ever total in the United Arab Emirates.

Hasan cracked two sixes and three fours inside the Powerplay – his 38 making up a vast majority of the 55 runs Bangladesh managed in the first six overs.

Sri Lanka’s only success in that passage of play came in the third over, when Asitha Fernando had opener Sabbir Rahman caught behind for 5.

Wanindu Hasaranga struck in his first over when he removed the dangerous Hasan immediately after the Powerplay, with Chamilka Karunaratne accounting for the key wicket of Mushfiqur Rahim in the next over, caught behind for 4 and Bangladesh on 63 for 3.

Shakib Al Hasan plundered 9 off the first 15 deliveries he faced, before cracking three boundaries in four balls, to up the ante.

He was bowled by Maheesh Theekshana soon after however, moving towards the leg side to make room, only to completely miss the ball and have his stumps rattled.

Afif Hossain and Mahmadullah then put on Bangladesh’s best partnership of the match, scoring 57 off 37 balls — each taking a six and four across two Hasaranga overs.

Afif Hossain was dismissed in the 17th over, and Mahmadullah in the 18th, but Bangladesh didn’t relent, with Mosaddek Hossain cracking four boundaries to finish unbeaten on 24 off 9 balls.