Dambulla - Kusal Mendis struck his maiden century before Taskin Ahmed claimed a hat-trick as Bangladesh dismissed Sri Lanka for 311 runs in the second one-day international in Dambulla on Tuesday.
Needing a win to stay alive in the three-match series, Mendis laid the foundation for a strong total for Sri Lanka with 102 off 107 before Taskin's late burst halted their progress at the Rangiri International Stadium.
Taskin took a catch off his own bowling to dismiss Mendis. Then he removed Asela Gunuratne (39), Suranga Lakmal and Nuwan Pradeep in the final over to complete his hat-trick as the fifth Bangladeshi bowler.
He finished with 4-47 giving Bangladesh a ray of hope after Sri Lanka dominated the visiting bowlers initially, having elected to bat first.
Mashrafe Mortaza took opener Danushka Gunathilaka early for nine but Mendis shared 111 runs with skipper Upul Tharanga for the second wicket to put Sri Lanka in a strong position.
A direct hit from Mahmudullah helped Bangladesh separate the duo as Tharanga was run out for 65, trying to complete a single off a no-ball off Mustafizur Rahman.
Mendis struck a six and a four in the next two balls to complete his fifty before racing to his century in 102 balls with a single off Mortaza.
He also shared 83 runs for the third wicket with Dinesh Chandimal, who chipped in with 24 runs.
Milinda Siriwardana also made a useful contribution with 30 runs.
Sri Lanka made three changes to their squad, bringing in Nuwan Kulasekara, Nuwan Pradeep and Dilruwan Perera for Sachith Pathirana, Lahiru Kumara and Lakshan Sandakan.