
Playing their 100th match in the longest format of the game, the touring side chased down their target of 191 in the final session to level the two-match series at 1-1.
Mathews left out of ODI squad for Bangladesh series
Bangladesh had lost 15 Tests and drawn two of their previous 17 matches against Sri Lanka and Sunday's victory is undoubtedly their best away from home after they beat England in Dhaka last October.
The South Asian nation's other Test successes have come against West Indies, whose glory days are long past and are no longer considered to be among test cricket's major players, and Zimbabwe.
Experienced opening batsman Tamim Iqbal anchored the chase with a stroke-filled 82 after home captain.
2nd Test: Sri Lanka in control against Bangladesh
Rangana Herath had picked up two wickets in successive deliveries to reduce Bangladesh to 22-2. Tamim, who hit seven fours and a six, added 109 for the third wicket with Sabbir Rahman before the latter fell for 41.
All-rounder Shakib Al Hasan fell for 15 with Bangladesh still 29 runs away from a famous victory and there were more nervous moments awaiting them.
Mushfiqur Rahim was given out leg before, but the Bangladesh captain managed to overturn the umpire's decision on review with replays confirming the delivery was missing the stumps.
Herath, celebrating his 39th birthday on Sunday, could not hold on to a return catch offered by Mosaddek Hossain, but later dismissed him for 13 with Bangladesh needing two for the win.
Mushfiqur remained unbeaten on 22 while Mehedi Hasan was not out on two after hitting the winning runs that sparked wild celebrations from the visiting team.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ