Towhid Hridoy struck 137 and shared a record 206-run stand with Litton Das to lift Bangladesh to 327 for six on the opening day of the first Test against South Africa in Johannesburg on Sunday.
It is Bangladesh's highest total against South Africa in Tests. Litton will resume on 92 on the second day.
Hridoy was lbw to Marco Jansen off the last ball of the day, ending a sixth-wicket stand that is now Bangladesh's highest against South Africa, home or away.
The previous best was 138, by Jaker Ali and Mehidy Hasan Miraz for the seventh wicket in Mirpur in 2024.
The pair came together after Kagiso Rabada had taken all five Bangladesh wickets to fall, reducing them to 121 for five.
Rabada struck with the first ball of the match, when debutant Mahfizul Islam was caught by Jansen at gully.
He then had Mominul Haque caught behind and bowled captain Najmul Hossain Shanto with an inswinging full delivery, leaving Bangladesh on 22 for three in the ninth over.
Tanzid Hasan and Hridoy rebuilt with a 99-run stand for the fourth wicket, the highest by a Bangladesh pair in South Africa at the time. It beat the 84 by Hannan Sarkar and Habibul Bashar in Potchefstroom in 2002.
Both survived chances. Aiden Markram, no, Ackermann at point got a hand to a catch off Tanzid from Jansen's bowling but could not hold it, and a Hridoy edge off Wiaan Mulder fell just short of third slip.
Tanzid reached his second Test fifty before lunch, but Rabada returned after the break to remove him and Mushfiqur Rahim off successive balls. Tanzid dragged a bouncer onto his stumps, and Mushfiqur was caught at third slip first ball.
It was Rabada's 18th five-wicket haul in Tests, and he became the first bowler to take five wickets in an innings five times against Bangladesh.
Hridoy and Litton then took control. They passed Bangladesh's first 100-run partnership on South African soil less than two hours after the Tanzid-Hridoy record, and batted through the rest of the day until Hridoy's dismissal.
Hridoy, playing only his fourth Test, became the second Bangladesh batter to score a Test century against South Africa. He has now passed fifty in three consecutive Test innings, after scoring an unbeaten 242 and 82 in the second Test against West Indies in Sylhet.
Litton reached his 22nd Test fifty off 71 balls.
Bangladesh chose to bat after Shanto won the toss, fielding three pacers and one spinner.