Bangladesh beat Sri Lanka by three wickets under the Duckworth/Lewis rain rule to win the third and final one-day cricket international at Pallekele and share the series one-all.
Sri Lanka looked to be in control when they ran up an impressive 302 for nine after choosing to bat first, Tillakaratne Dilshan's 17th one-day century proving the highlight.
But Bangladesh whose run chase was interrupted in the 14th over when they were 78-1, were then set a revised target of 183 to win off 27 overs.
They were given a splendid start by Anamul Haque (40) and Mohammad Ashraful (29) who posted 77 at a run-a-ball.
Bangladesh complete their five-week tour of Sri Lanka on Sunday when they take on the hosts in a one-off Twenty20 international at the same venue.