Dhananjaya de Silva scored 104 not out as Sri Lanka made a strong reply after dismissing Bangladesh for 513, including Mominul Haque's 176, on the second day of the opening test on Thursday.
De Silva's fourth century, his second in succession following his 119 (retired hurt) against India, helped Sri Lanka reach a comfortable 187-1 at the close of play.
"It looks like an even contest now," Sri Lanka spinner Rangana Herath said. "There will be something in the pitch for the spinners from the third day onwards. I could see some turn even after tea today."
Bangladesh sensed an opportunity to keep its domination over Sri Lanka when off-spinner Mehidy Hasan (1-45) had opener Dimuth Karunarate caught behind at first slip before the visitors scored.
But de Silva and opener Kusal Mendis, on 83, ensured Sri Lanka didn't lose a wicket for the rest of the day.
Mendis survived some close calls toward the end as Bangladesh left-arm spinner Taijul Islam challenged the umpire's decision twice in his consecutive two overs. But Mendis remained not out, forcing Bangladesh to lose its two reviews.
De Silva was flawless in his 127-ball innings in which he hit 15 boundaries.