The first test between Sri Lanka and Bangladesh was heading for a draw Monday after a high-scoring display by both teams that saw captain Mushfiqur Rahim become the first Bangladeshi player to score a double century.
Sri Lanka finished day four on 116 for one in its second innings with a slender lead of 48 runs. Sri Lanka made 570 for four declared in its first innings and Bangladesh reached 638 all out in reply.
Tuesday is the last day of the game and with the wicket offering no assistance for bowlers, Bangladesh is likely to force a draw. It has lost all its previous 12 tests to Sri Lanka.
The star of the day was Rahim, who was unbeaten on 198 at lunch and then reached 200 soon after the break by pushing Nuwan Kulasekara for a single to the cover region. He was trapped leg before wicket in the same over without further addition to the score. His 200 came off 321 balls with 22 fours and a six.
The other highlight of the day was a maiden test century for Nasir Hossain, who shared a 106-run stand for the sixth wicket with his captain.
Bangladesh lost five wickets between lunch and tea, but not before posting its highest total in test cricket.
Mushfiqur established the highest individual score by a Bangladeshi batsman in the process in a patient knock in the scorching heat of Galle. His stand lasted for seven and half hours.
The record partnership between him and Mohammad Ashraful, Bangladesh's most experienced batsman with 58 tests, laid the foundation for the massive total, the second highest on Sri Lankan soil by a visiting team. Their stand was the best partnership for Bangladesh for any wicket against any opposition.
Ashraful, who resumed the day on 189, missed out on a double hundred due to lapse of concentration after adding just one run to his overnight total.
Later in the day, Sri Lanka lost opener Dimuth Karunaratne when he was caught at long leg after mistiming a hook shot off Shahadat Hossain.
Tillakaratne Dilshan completed a half-century and was unbeaten on 63 with Kumar Sangakkara on 43.