Mohammad Ashraful and Mushfiqur Rahim posted centuries Sunday to help Bangladesh to 438 for four in reply to Sri Lanka's 570 for four declared on the third day of the first test at Galle International Stadium.
Bangladesh still trails by 138 runs.
The experienced duo put together an unbroken 261-run stand, the highest for Bangladesh for any wicket, breaking the previous best of 200 between Tamim Iqbal and Junaid Siddiq against India. Their stand is also a new record at Galle for any wicket by any team.
Ashraful, Bangladesh's former captain and the most experienced player with 58 tests played, wasn't part of the original squad and only injuries to other players gave him his chance. Playing his first test since 2011, the 28-year-old posted the highest score by a Bangladeshi batsman in an innings, breaking his own record. The previous best was his unbeaten 158 against India. He was unbeaten on 189 at stumps and is set to become the first Bangladeshi to score a double hundred.
During his knock, Ashraful became the 11th batsman to score 1000 test runs against Sri Lanka. Of his six test hundreds, five have come against Sri Lanka.
Bangladesh lost overnight batsman Mominul Haque for 56 in the morning and soon afterwards Mahmudullah perished without scoring, but the fifth wicket partnership helped Bangladesh avoid the follow on. This is also Bangladesh's best total away from home in a test. Their previous best total was 416 all out against West Indies in St. Lucia in 2004.
Ashraful, who had made a hundred on debut against Sri Lanka in 2001, reached his sixth test century with a glorious cover drive in the morning session off Ajantha Mendis.
Mushfiqur reached three figures after tea with a sweep shot, also off Mendis. He was unbeaten on 152 off 239 balls with 18 fours and a six.
Sri Lanka put down tough chances off both batsmen.
The partnership helped Bangladesh's chances of drawing the match. Sri Lanka has won all 12 tests against Bangladesh.
In the morning session, Sri Lanka dismissed overnight batsman Mominul Haque when he was caught at first slip by Angelo Mathews off the bowling of Nuwan Kulasekara. They got a second wicket a short time later when Mahmudullah attempted to clear the ground before getting off the mark, but missed the ball completely and was stumped by Dinesh Chandimal.