Kusal Mendis was agonisingly denied a maiden double century as Sri Lanka posted a score of 494 before Bangladesh made a steady start to their reply in the first Test Wednesday.
Bangladesh were 31 without loss at tea on the second day at the Galle International Stadium after Mendis was dismissed for 194 as he tried to reach his double ton in style.
Tamim Iqbal caught Mendis on the boundary ropes at long-on, off teenage off-spinner Mehedi Hasan, as the right-handed batsman attempted an audacious six.
Tamim ran backwards to take the catch, lobbing the ball back into the field as his feet crossed the boundary ropes and then pouching it again.
Mendis faced 294 balls and struck 19 fours and four sixes in his seven-and-a-half-hour stay on the crease.
The 22-year-old, who was unbeaten on 166 overnight, was earlier granted a reprieve by a no-ball on the first delivery he faced.
He was almost dismissed when he struck his first six of the morning as Mustafizur Rahman took a catch off the bowling of Subashis Roy but stepped on the rope on the fine leg boundary.
Spinner Mehedi took four wickets for 113 runs. After Mendis walked, Mehedi dismissed Niroshan Dickwella as the wicketkeeper batsman gave a catch to Mahmudullah at midwicket after making 75 off 76 balls.
Dickwella, who hit six fours and a six in his quick-fire innings, put on 110 with Mendis for the fifth wicket off just 124 balls.
Mustafizur then removed Rangana Herath for 14 and Suranga Lakmal was run out for eight to give Bangladesh some respite.
Mehedi trapped Dilruwan Perera leg-before on 51 before taking a stunning catch to send last man Lakshan Sandakan packing off Shakib Al Hasan.
Bangladesh then started their first innings steadily. Tamim Iqbal was 17 not out while Soumya Sarkar was unbeaten on 14 at the last break of the day.