Bangladesh celebrated their 100th Test in memorable fashion, defeating Sri Lanka for the first time to square the series in Colombo.
The four-wicket win on the final day at the P Sara Oval will go down as one of the Tigers' finest results and their ninth at this level.
The hosts set a challenging winning mark of 191, boosted by important tail-end runs in the morning from Dilruwan Perera (50) and Suranga Lakmal (42), who took Sri Lanka from their overnight 268-8 to 319 all out.
Shakib Al Hasan wrapped things up by dismissing Lakmal, finishing with 4-74.
Rangana Herath scuppered hopes of a solid start to the chase, removing Soumya Sarkar and Imrul Kayes, but Tamim Iqbal played a mature knock to keep Bangladesh in the hunt.
He put on 109 with Sabbir Rahman, before he was eventually undone by Perera for a vital 82.
Perera threatened to get on a roll, picking off Rahman for 42 then claiming the prized scalp of Shakib to make it 162 for five.
Mushfiqur Rahim, the touring captain, was left to usher his side towards the line after overturning an lbw decision on review, and 19-year-old Mehedi Hasan had the honour of striking the winning runs.