Rahmat Shah became Afghanistan's first Test centurion on day one of a finely poised contest with Bangladesh.

Afghanistan closed Thursday's play of the one-off Test on 271-5 thanks in large part to Rahmat's 102 and an unbeaten 88 from Asghar Afghan.

Bangladesh may feel they could have been in a better position on a spinner-friendly pitch in Chattogram and will be targeting a swift start to day two.

Rahmat, who came so close to three figures against Ireland earlier this year, struck 10 fours and two sixes, bringing up his landmark score with a fine cut past short third man.

From the next ball he clipped Nayeem Hasan to slip where Soumya Sarkar took a sharp catch, ending a 120-run stand with Afghan.

The wheels threatened to come off as Mohammad Nabi (0) was bowled in the same over and Hashmatullah Shahidi added just 14.

But Afghan, who survived an lbw call on review on 42, kept the Bangladesh attack at bay by mixing poise with the odd flash of brilliance.

Afghan will look to join Rahmat in the list of Afghanistan Test centurions when he resumes alongside Afsar Zazai (35 not out) on Friday.