Sri Lanka overcame an early batting collapse to beat Bangladesh by 13 runs in the first of three ODIs in Dhaka.
Thisara Perera hit a one-day best 80 not out from number nine as Sri Lanka recovered from 67-8 to post a total of 180 all out in 40 overs.
And that proved just enough; Bangladesh stumbling from 114-2 to 167 all out, including 3-21 for Sri Lanka captain Angelo Mathews.
Bangladesh had already suffered defeats in the Test and T20 series against the same opponents but looked well on course to turn the tables after sending Sri Lanka into bat.
ODI debutants Al-Amin Hossain (1-34) and Arafat Sunny (2-31) were among the wickets as Sri Lanka were soon plunged into a full-scale crisis.
Sachithra Senanayake (30) walked out to join Perera in the 22nd over and the ninth-wicket pair led the fight back with an 82-run stand in 14 overs, although both batsmen were dropped twice.
Perera was left unbeaten after hitting four fours and six sixes in his 57-ball contribution.
Bangladesh lost Amanul Haque to the second delivery of their run chase when Mathews pulled in Senanayake's parry in the slips after Lasith Malinga found the outside edge.
But Shamsur Rahman (62) and Mominul Haque (44) put on 79 in good time before it went wrong for Bangladesh.
Perera (1-35) accounted for Mominul but it was the run out of Rahman - his bat getting stuck as he attempted to run it in - that prompted a terminal collapse, the last eight wickets going down for 53 runs.
Victory was sealed with the third run out of a Bangladesh effort lasting 39.2 overs in total.
The second ODI takes place at the same venue on Thursday.