Liton Das and Shakib Al Hasan put up an unbroken 96-run stand to give Bangladesh a faint hope of drawing the second Test against Sri Lanka in Dhaka on Friday.
The pair guided Bangladesh to 149-5 at lunch on the fifth and final day, a slender lead of eight runs at Sher-e-Bangla National Cricket Stadium. A counter-punching Shakib made his 27th Test fifty in the last ball before the break with a boundary off Dhananjaya de Silva while Liton was not far behind on 48.
Bangladesh need to bat out two more sessions or at least set Sri Lanka a large target if they are to draw both the Test and the two-match series.
Play resumed with the hosts at a precarious 34-4 and Sri Lanka upped the pressure when Kasun Rajitha bowled Mushfiqur Rahim for 23 in the eighth over.
But Shakib and Liton mixed caution with aggression to frustrate the visitors through the rest of the morning. Shakib's counter-attack saw him hit Rajitha for three fours in one over, forcing Sri Lanka to widen their field set-up. Liton played an anchor role after resuming on one overnight. He was given out caught behind off Rajitha on nine as he attempted to flick a ball going down the leg, but survived on review. It was the fourth caught behind decision overturned in the match, all given by West Indies umpire Joel Wilson.
Sri Lanka made 506 runs in the first innings after bowling out Bangladesh for 365.
The first Test in Chittagong ended in a draw.