Kumar Sangakkara and Dinesh Chandimal both scored centuries on day four of the second and final Test in Chittagong as Sri Lanka set Bangladesh a victory target of 467.
Sangakkara followed up the triple-century he scored in the first innings with 105 and Chandimal made an unbeaten 100 before Sri Lanka declared on 305 for four.
Bangladesh then reached stumps at 12 without loss having survived a testing session late in the day. They were earlier bowled out for 426 in their first innings, replying to Sri Lanka's 587.
They began the day on 409 for eight and added just 17 more runs before Ajantha Mendis finished off the innings with the wickets of Mahmudullah (30) and Al-Amin Hossain (0) to end with figures of six for 99.
Sangakkara then hit 105 in 144 balls and Chandimal 100 not out in 158 deliveries, at which point Sri Lanka declared to set Bangladesh a huge target.
They made a solid start to their run chase with Tamim Iqbal on seven and Shamsur Rahman on four as they batted through eight overs.
Rahman (106) and Imrul Kayes (115) both scored their maiden Test centuries on day two for Bangladesh.
Sri Lanka lead the series 1-0 after winning the opening Test by an innings and 248 runs.
© Cricket World 2014