Tharanga powers Sri Lanka to safety
Tharanga's fine knock, a mixture of studious defence and adventure, saved Sri Lanka from potential embarrassment as they slumped to 43 for 4. First, he consolidated the innings in partnership with Mahela Jayawardene (49), settling dressing-room nerves as they added 124 runs, before carrying Sri Lanka to first-innings parity with Tillakaratne Dilshan (33).
But once again, when a run fest had beckoned after Muttiah Muralitharan's first-day wizardry, Bangladesh displayed resilience and a never-say-die spirit. Perhaps, with hindsight, they might rue not being more aggressive in the first session, but they could not be faulted for application or effort.
Shahadat Hossain epitomised this spirit with intense bursts throughout the day. In the first Test he mopped up the Sri Lanka tail with a series of bumpers and here he shook up the top order as Thilan Samaraweera (20) feathered a catch behind off a rising ball and Kumar Sangakkara (0) departed first ball to an lbw shocker.
Later on, too, as Sri Lanka eyed a commanding lead after the tea interval, Bangladesh came back strongly, this time through their spinners as Mohammad Rafique hurried an arm through Dilshan and Enamul Haque snapped up both Farveez Maharoof (7) and Dilhara Fernando to leave Sri Lanka on 263 for 8.
Sri Lanka, though, finished strongly with an obstinate stand between Tharanga and Lasith Malinga, who batted responsibly in his newly-promoted position of No.9, hanging in for 64 balls for his 12 not out. The pair added 39 in the final hour, tipping the match towards Sri Lanka as their lead reached handy proportions.
However, Bangladesh are by no means out of the fight yet. Should they clean up the tail on the third morning then they are still in the game. The question is whether they can deliver in the second innings as the pressure intensifies - if they can then Sri Lanka will be left with a tricky run chase.
Thilan Samaraweera c Mashud b Hossain 20 (43 for 3)
Cement-footed backfoot drive
Kumar Sangakkara lbw Hossain 0 (43 for 4)
Poor decision - ball pitched outside leg
Mahela Jayawardene c Rahim b Ashraful 49 (167 for 5)
Smashes long hop straight down midwicket's throat
Tillakaratne Dilshan b Rafique 33 (232 for 6)
Makes room, beaten by flatter arm ball
Farveez Maharoof c Mashud b Haque 7 (251 for 7)
Ball bites takes edge, juggling catch on third attempt
Dilhara Fernando lbw Haque (263 for 8)
Played across straightening ball that pitched on
Charlie Austin is Cricinfo's Sri Lankan correspondent.