(CNN) -- Bangladesh gave Sri Lanka a scare but a late collapse denied them a shot at the most unlikely of Test victories in Dhaka on Wednesday.

Shakib Al Hasan fell just four runs short of his century as Bangladesh lost the opening Test in Dhaka.
Having been set a daunting target of 521 by the tourists, Bangladesh -- led by Mohammad Ashraful's outstanding century -- briefly looked capable of making a fight of it as they reached lunch on day five at 373 for six.
But after Shakib Al Hasan went four runs shy of his own ton, Sri Lanka swept up the Bangladesh tail at a cost of just 10 runs to wrap up victory in this first of two Tests by 107 runs.
On Tuesday night, captain Mohammad Ashraful and Shakib Al Hasan put on 74 before stumps and continued in the same vein on Wednesday morning, adding another 38 before Ashraful was finally removed.
The 24-year-old lofted a Chaminda Vaas delivery for four to reach his century but perished for 101 in Vaas' next over when he was caught low on the pad by a ball heading for middle and leg stump.
But Shakib and Mushfiqur Rahim continued to frustrate the Sri Lankan attack, adding another 81 runs to take Bangladesh to the interval without further loss and put them within 148 runs of their target.
After the break, Shakib continued to close on what would have been his first Test century, but with the milestone in sight he sent an inside edge on to the stumps chasing a full delivery from Dammika Prasad.
That left the hosts on 403 for seven but running out of batsmen, and Sri Lanka pounced to take advantage.
Mashrafe Mortaza scored only two runs before he was caught behind by Prasanna Jayawardene off Prasad.
Mushfiqur Rahim had managed his fourth Test 50 but, perhaps feeling the pressure as he ran out of partners, he attempted an ambitious shot through midwicket off Muttiah Muralitharan and sent the ball straight into the hands of Tillakaratne Dilshan to depart for 61.
The Bangladesh innings then came to an end when Mahbubul Alam was run out having scored two, leaving the scoreless Shahadat Hossain as the last man standing.
Muralitharan, who did most of the damage on Tuesday, took four second-innings wickets at a cost of 141 runs, while Prasad returned figures of three for 105.
Bangladesh have achieved only one previous Test victory, a 226-run win against Zimbabwe in Chittagong in January 2005.
Meanwhile, heavy rain washed out the first one-day international between West Indies and New Zealand in Queenstown on Wednesday.
New Zealand captain Daniel Vettori won the toss and invited the West Indies to bat, with the tourists reaching 129 for five when the players were forced off for the third and final time.
The teams move on to Christchurch for the second match on Saturday.
| Most Viewed | Most Emailed |