Rahmat Shah became the first cricketer from Afghanistan to score a century in Test cricket, during the one-off Test against Bangladesh, in Chattogram on Thursday.
Shah's fluent 102 helped Afghanistan finish the opening day on a strong position as they reach 271 for five in 96 overs at stumps.
Earlier in the day, Afghanistan won the toss and elected to bat first.
Bangladesh, who went into the match without a specialist fast bowler, claimed a few early wickets to reduce the visitors to 77 for three.
Shah, along with Asghar Afghan, then rallied Afghanistan as the duo stitched a 120-run stand for the fourth wicket.
Shah hit 10 fours and two sixes in his 187-ball knock before he was caught by Soumya Sarkar off Nayeem Hasan.
Former captain Afghan kept Bangladesh, who used as many as eight bowlers, at bay with a sparkling innings of 88 not out.
Mohammed Nabi perished for a duck but Afghan and Afsar Zazai (35 not out) were involved in an unbroken stand of 74 for the sixth wicket to help their team gain the upperhand.
Earlier, Afghanistan spinner Rashid Khan created history as he became the youngest player ever to captain a Test team.
Aged 20 years and 350 days when he walked out for the toss on the first day, Rashid broke a 15-year record held by former Zimbabwe wicketkeeper Tatenda Taibu, who was eight days older when he led his side against Sri Lanka in Harare in 2004.
Rashid was appointed Afghanistan's captain across all three formats of the game in July after the team's dismal performance at the 50-over World Cup, where they lost all nine of their group matches and finished at the bottom of the standings.
Afghanistan's Rashid becomes youngest Test captain
Is this why KL Rahul is struggling in Test cricket?
Tendulkar pays homage to Achrekar sir on Teachers' Day
Ponting's advice for out of form Warner
Coach Shastri celebrates India's win with a 'punch'