Imrul Kayes and Shamsur Rahman hit their maiden centuries to lift Bangladesh to 409-8 at stumps on the third day of the second test against Sri Lanka on Thursday.
Shakib Al Hasan contributed 50 while Nasir Hossain made 42.
The hosts are trailing by 178 runs after Sri Lanka amassed 587 in its first innings.
Kayes struck 115 while Rahman made 106 in just his second test to lay a solid platform. Their 232-run second-wicket partnership was a record for Bangladesh.
Kayes smashed 17 fours and one six while Rahman hit 11 boundaries and one six. Rahman was the first to reach his century, hitting a Mathews delivery to the cover boundary.
Kayes looked nervous on the brink of his century, offering a catch to point off the bowling of Mendis but Kithuruwan Vithanage failed to grasp it. Three deliveries later, off the same bowler, Vithanage held on to the catch in the same area but it was a no-ball.
The pair surpassed the previous best second-wicket stand for Bangladesh the 200 scored by Tamim Iqbal and Zunaed Siddique against India in 2010. It was also Bangladesh’s second-highest partnership for any wicket.
Both players finally fell to aggressive shots from Ajantha Mendis. After Bangladesh avoided the follow-on, Mendis struck again, claiming Nasir and Sohag Gazi in consecutive deliveries. Dilruwan Perera then could have got Al-Amin Hossain but Karunaratne failed grab the easy catch at long-on.
Mendis ended the day with 4-84 while Perera claimed 3-114.
Mahmudullah and Hossain will resume the batting on day four with 30 and 3 respectively.
Scoreboard
Sri Lanka— 1st innings : 587.
Bangladesh— 1st innings : Tamim Iqbal b Lakmal 0, Shamsur Rahman b Mendis 106, Imrul Kayes b Mendis 115, Mominul Haque lbw b Perera 13, Shakib Al Hasan c Karunaratne b Perera 50, Mushfiqur Rahim c Silva b Perera 20, Nasir Hossain c Chandimal b Mendis 42, Mohammad Mahmudullah (batting) 30, Sohag Gazi lbw b Mendis 0, Al-Amin Hossain (batting) 3; Extras: (b-8, lb-1, nb-21): 30; Total (for eight wkts. in 115 overs): 409.
Fall of wickets : 1-0, 2-232, 3-252, 4-259, 5-319, 6-350, 7-396 , 8-396.
Sri Lanka bowling : Lakmal 23-5-68-1, Pradeep 15-2-96-0, Mendis 27-2-84-4, Perera 39-4-119-3, Mathews 11-1-33-0.