Angelo Mathews missed out on his second double hundred by one run as Bangladesh bowled out Sri Lanka for 397 runs in the first Test in Chittagong on Monday.
Bangladesh made a solid reply with the bat, reaching 76-0 at stumps on the second day, with opener Tamim Iqbal on 35 and Mahmudul Hasan on 31.
Off-spinner Nayeem Hasan earlier broke Mathews's heart, forcing him to spoon a catch to Shakib Al Hasan at square leg on 199 as he made a desperate attempt to complete his double hundred with last man Vishwa Fernando at the other end.
The Sri Lankan's previous highest Test score was 200 not out.
Nayeem finished with 6-105 on his home ground, the Zahur Ahmed Chowdhury Stadium, while Shakib claimed 3-60 for Bangladesh.
Running out of partners, Mathews had the double hundred in his sights after sharing 47 runs with Vishwa for the ninth wicket.
But the number 10 took a blow on his helmet before tea and did not return to the field.
Vishwa then heroically returned to the crease, prompting Mathews to make his desperate attempt for the double hundred.
He struck Taijul Islam for a four to reach 196 before a single and double took him even closer, only to be denied by Nayeem.
Mathews, who resumed on 114, earlier shared 136 runs with fellow overnight batsman Dinesh Chandimal (66).
In the 24th over of the session, Chandimal attempted a premeditated reverse sweep but failed to make contact and was given out lbw, upheld on review.
Nayeem soon had a fourth wicket when he bowled wicketkeeper-batsman Niroshan Dickwella, who made only three, four balls later.
Shakib took two wickets in two balls in the first over after the break to push Sri Lanka into a corner.
He first bowled Ramesh Mendis for one and then trapped Lasith Embuldeniya leg before for no score.
Mushfiqur Rahim dropped Fernando at mid-on on 16 to deny Shakib his fourth wicket.
Bangladesh also missed a chance to dismiss Mathews on 119 in the fourth over of the day.
Khaled Ahmed beat the Sri Lankan with an outswinger but there was no appeal for a catch behind, despite technology suggesting Mathews had edged the ball.
Mathews hit 19 fours and a six in his 397-ball innings before the agonising end as Bangladesh wrapped up Sri Lanka's first innings in 153 overs, 40 minutes into the final session.