The hosts, who got a 182-run lead in the first innings, reached 87-1 at lunch on the fourth day, stretching their advantage to 269 runs after beginning their second innings in the morning.
Tharanga remained unbeaten on 40 as the hosts were aiming to accelerate their run-rate to set up a target before giving their bowlers adequate time to dismiss Bangladesh again.
Dimuth Karunaratne was the only batsman to be dismissed in the second innings giving a catch to Mahmudullah at square leg off Taskin Ahmed after making 32 runs.
Sri Lankan openers, however, showed little urgency to go after the bowlers as at least 98 overs are scheduled for the day.
More From This Section
Karunaratne, who was dropped by Shakib Al Hasan of fellow spinner Mehedi Hasan on seven, and Tharanga batted cautiously conceding four consecutive maidens to Mustafixur Rahman at one stage.
The pressure of dot balls finally did the trick for Bangladesh as Taskin removed Karunaratne with a back of the length delivery.
Sri Lanka's first innings hero Kusal Mendis, who made 194 runs, was batting on eight with Tharanga at the break.