Lasith Malinga became only the fifth bowler in the history of Twenty20 internationals to claim a hat-trick as Sri Lanka restricted Bangladesh to 176-9 in the second and final match of the series in Colombo on Thursday.
Malinga bowled Mushfiqur Rahim and Mashrafe Mortaza and trapped debutant Mehedi Hasan lbw in his final over to finish with 3-34.
His feat, the second Sri Lankan to achieve the mark after team-mate Thisara Perera, spoiled a good start by Bangladesh, who were bidding for a perfect send-off to their captain Mashrafe who is retiring after the series.
Imrul Kayes and Soumya Sarkar added 70 runs in a record opening partnership to give the visiting side a solid start at the R. Premadasa Stadium after Mashrafe won the toss and opted to bat in his final Twenty20 international.
Imrul and Soumya surpassed Tamim Iqbal and Anamul Haque's 63 runs against Nepal in an ICC World Twenty20 in 2014, which was Bangladesh's best start until this game.
Soumya made 34 off 17 balls before he was caught and bowled by Asela Gunaratne while Imrul, who replaced injured Tamim Iqbal in the starting line-up, was run out after making 36 off 25 balls.
Shakib and Sabbir Rahman shared another 46 runs for the third wicket before Sri Lanka had another success as Vikum Sanjaya bowled Sabbir for 19 runs.
Nuwan Kulasekara bowled Shakib to end his prolific 31-ball innings of 38, the highest for Bangladesh before Malinga's hat-trick stunned the visitors.
Sri Lanka lead the two-match series 1-0 after winning Tuesday's opening match by six wickets.