After Sri Lanka declared its second innings on 305/4, setting Bangladesh a winning target of 467, the hosts were 12 without loss at stumps. Tamim Iqbal and Shamsur Rahman were on 7 and 4 respectively.
Sangakkara hit 319 runs in the first innings and 105 in the second on Friday to join former England captain Graham Gooch in an exclusive club.
Sangakkara was dropped on 36 by Nasir Hossain at deep mid-wicket off the bowling of Shakib Al Hasan.
Gooch scored 333 and 123 against India at Lord's in 1990. Sangakkara was 33 runs short of breaking Gooch's record for most runs in a single test.
Wicketkeeper Dinesh Chandimal struck an unbeaten 100, straight after which Sri Lanka skipper Angelo Mathews declared the second innings. Mathews was not out on 43.
Mahmudullah took 2-46 while Shakib Al Hasan returned 1-80.