A top-order batting blitz brought Sri Lanka to 314-4 and left the tourists firmly in command of the second and final Test against Bangladesh on Saturday.
Kusal Mendis top-scored with 93 in Chittagong while openers Dimuth Karunaratne (86) and Nishan Madushka (57) helping power the innings.
Dinesh Chandimal was batting on 34 alongside skipper Dhananjaya de Silva on 15 at stumps.
Bangladesh struggled to make an impact after being put in to bowl, with Sri Lanka batting through the morning session without losing a wicket.
Madushka was run out attempting a double shortly after lunch but Karunaratne and Mendis drove the tourists forward with a 114-run stand.
Hasan sent back Karunaratne, who chopped a delivery into the stumps, before the tea break.
He struck eight fours and a six in his 129-ball innings, surviving a run-out scare on 18 after a mix-up with Madushka while taking a single off Hasan Mahmud.
Follow us on our Official WhatsApp channel
Shakib Al Hasan denied Mendis his 10th Test century, forcing an edge to Mehidy at second slip.
Hasan picked up his second wicket when Mehidy caught Angelo Mathews (23) from the same spot in the first over after the second new ball.
Chandimal struck two sixes to move past his early shakiness before helping Sri Lanka pass the 300-run mark with a four off Hasan.
Sri Lanka lead the two-match series 1-0 after winning the opening Test by a resounding 328 runs.
Veteran all-rounder Shakib returned for Bangladesh after a long Test absence, and the hosts also handed a debut to Mahmud.
Sri Lanka brought Asitha Fernando in for injured Kasun Rajitha in their only change to the squad from the opening Test.
READ: West Indies unveil squad for white-ball tour to Pakistan