DHAKA (AFP) - Bangladesh gave one of their best batting performances before suffering a 107-run defeat in the opening Test against Sri Lanka here on Wednesday. Chasing an unlikely 521-run target, the hosts were bowled out for 413 on the fifth and final afternoon after skipper Mohammad Ashraful's brilliant 101 and man-of-the-match Shakib Al Hasan's career-best 96. It was Bangladesh's fourth-highest total in 58 Tests and the 11th-best fourth-innings performance in the history of the game. Only four teams - the West Indies, South Africa, India and Australia - have won a Test after chasing more than 400 in the fourth innings. Sri Lankan off-spinner Muttiah Muralitharan finished the Test with 10-190, his 22nd haul of 10 or more wickets in a match. "If Shakib and I had stayed at the crease until lunch, maybe it (the target) was possible," said Ashraful."Unfortunately, I got out and Shakib missed his century. Once he left, we gave up hope. But we did not lose heart as (Mushfiqur) Rahim was in very good form in the last couple of series."Sri Lanka struggled for wickets for more than a session as Ashraful, Hasan and wicket-keeper Rahim (61) all applied themselves remarkably well on a wearing fifth-day track. Sri Lankan captain Mahela Jayaawardene praised Bangladesh's effort, saying they were an improved side."In the last couple of Test series, they came very close to winning against New Zealand and probably also against South Africa. So we knew what they were capable of doing," he said."Credit should go to them. One good thing was that we had 521 runs behind us and we knew we had to be patient and create opportunities." The hosts called the shots in the morning session, adding 119 to their overnight total of 254-5 for the loss of just one wicket. Ashraful, on 70 overnight, continued to defy the Sri Lankan attack with a wide range of strokes, reaching his hundred with a lofted drive over mid-off for a four off veteran left-arm seamer Chaminda Vaas. Vaas, however, soon got a big wicket when he trapped Ashraful leg-before in his opening spell with the second new ball, but not before the Bangladeshi captain had added 112 for the sixth wicket with Hasan. Ashraful smashed 16 fours in his fifth Test hundred - his fourth against Sri Lanka. There was no respite for the visitors after Ashraful's dismissal as Hasan and Rahim continued to do the good work, adding 111 for the seventh wicket to give their rivals many anxious moments. Sri Lanka breathed a sigh of relief when Hasan fell just four runs short of his maiden Test hundred, inside-edging seamer Dammika Prasad's delivery on to his stumps. He hit seven fours in his 212-ball knock. Rahim was the ninth man out, caught at mid-wicket by Tillakaratne Dilshan off Muralitharan after hitting seven fours in his fourth Test half-century. The second and final Test starts in Chittagong on January 3. SCOREBOARD SRI LANKA, 1st innings: 293 (T. Samarweera 90, Shakib Al Hasan 5-70) BANGLADESH, 1st innings: 178 (I. Kayes 33, M. Muralitharan 6-49) SRI LANKA, 2nd innings: 405-6 decl (M. Jayawardene 166, K. Sangakkara 67) BANGLADESH, 2nd innings (overnight 254-5): Tamim Iqbal c P. Jayawardene b Prasad 47 Imrul Kayes run out 13 Junaid c M. Jayawardene b Muralitharan 37 Raqibul Hasan b Muralitharan 2 4 Mohammad Ashraful lbw b Vaas 101 Mehrab c Kapugedera b Muralitharan 23 Shakib Al Hasan b Prasad 96 Mushfiqur c Dilshan b Muralitharan 61 Mashrafe c P. Jayawardene b Prasad 2 Mahbubul Alam run out 2 Shahadat Hossain not out 0 EXTRAS: (lb3, nb4) 7 TOTAL: (for all out) 413 Fall of wickets: 1-40 (Kayes), 2-72 (Iqbal), 3-124 (Siddique), 4-144 (R. Hasan), 5-180 (M. Hossain), 6-292 (Ashraful), 7-403 (S. Hasan), 8-409 (Mortaza), 9-411 (Rahim). BOWLING: Vaas 25-5-74-1 (nb2) Prasad 25.2-5-105-3 (nb1) Muralitharan 48-9-141-4 Herath 26-4-86-0 (nb1) Dilshan 2-0-4-0. Overs: 126.2 Result: Sri Lanka win by 107 runs Toss: Sri Lanka Umpires: Steve Bucknor (WIS) and Nigel Llong (ENG) TV umpire: Enamul Haque (BAN) Match referee: Jeff Crowe (NZL) Second Test: Chittagong (Jan 3-7)