Kumar Sangakkara made more history as Sri Lanka set Bangladesh 467 to win the second Test in Chittagong.
Sangakkara followed on from his first innings 319 with 105 in the second innings. as the tourists declared on 302-4.
The hosts reached 12-0 at the close and need to bat out the final day at the Zahur Ahmed Chowdhury Stadium to avoid losing the series 2-0.
Bangladesh resumed their first innings on 409-8 and added just 17 more runs with Ajantha Mendis picking up the final two wickets to finish with a career-best 6-99.
|Bangladesh 1st Innings: 426 all out (119.5 overs)|
|Mahmudullah||c Silva||b A Mendis||30||70|
|Al-Amin||b A Mendis||9||31|
|Extras||21nb 0w 8b 1lb||30|
Sri Lanka had earned a 161-run first innings lead and had advanced to 68-2 at lunch, with Mahmudullah removing both openers Dimuth Karunaratne (15) and Kaushal Silva (29).
Shortly after the adjournment, Mahela Jayawardene was dismissed for 11 by Shakib Al Hasan, but then Sangakkara took over.
He survived a chance on 36 when Nasir Hossain dropped a chance at deep mid-wicket and went on to make his eighth consecutive 50-plus score against Bangladesh.
The 36-year-old left-hander brought up his 34th Test century with a six over wide long-on off Sohag Gazi, his ton coming up off 143 balls.
He departed on the next ball, attempting a fine sweep off a straight ball, but not before he had made the third highest run total in a Test match.
A 145-run partnership with Dinesh Chandimal had taken Sri Lanka's lead to 384, but captain Angelo Mathews delayed the declaration to allow the 24-year-old to score his third Test century.
|Sri Lanka 2nd Innings: 305 for 4 declared (75.5 overs)|
|Karunaratne||c Nasir Hossain||b Mahmudullah||15||55||38|
|M Jayawardene||lbw||b Shakib||11||39||29|
|Extras||0nb 0w 0b 2lb||2|
Mathews allowed his bowlers just 25 minutes late in the day to make a breakthrough, and they will come back on Saturday looking to take the 10 wickets needed to win the match.