Mohammad Ashraful and Mushfiqur Rahim shared in a record stand to give Bangladesh real hope of saving the first Test against Sri Lanka in Galle.
The pair both hit big unbeaten hundreds and put on 261 for the fifth wicket as Bangladesh closed the third day on 438-4 in reply to the hosts' 570-4 declared.
It was the highest partnership in Bangladesh's 13-year Test history and Ashraful's 189 not out took him past his own record for the country's highest individual score. Rahim was still with him on an unbeaten 152.
Earlier, Sri Lanka took two wickets in the morning session, with Test debutant Mominul Haque reaching a maiden half-century with a lovely strike down the ground before he was dismissed for 55 after edging Nuwan Kulasekara to first slip.
Ashraful seemed unaffected and plundered a six over extra cover off Rangana Herath, who would pick up his first wicket of the innings when Mahmudullah unwisely tried to follow his team-mate's lead and was stumped to depart for a duck.
Rahim steadied any nerves with two boundaries in an over off Kulasekara, while Ashraful thumped Ajantha Mendis through cover for four to reach three figures in his first Test since December 2011.
After the lunch break it was Rahim who was the more attacking of the pair and he brought up his 50 with a single to deep cover in the same over Sri Lanka took the new ball.
Kulasekara and captain Angelo Mathews could not force a breakthrough and Ashraful - having not found the boundary rope for 20 overs since reaching his hundred - struck back-to-back fours through the off-side off the latter.
The number three batsman continued to keep the score ticking over along with Rahim, who notched just his second Test hundred in the evening session as Bangladesh closed just 132 behind.