Mushfiqur Rahim rescued Bangladesh on the first day of the second and final Test against South Africa on Wednesday.
Rahim hit 65 in 86 balls and dominated a last-wicket stand of 56 as the visitors were bowled out for 250 after winning the toss and electing to bat first.
South Africa reached 20 for one in reply at the close, Neil McKenzie falling for a duck after edging Mashrafe Mortaza to debutant Raqibul Hasan in the gully.
Wicketkeeper Rahim's rousing innings included nine fours, and two sixes off fiery fast bowler Dale Steyn.
Last man Mahbubul Alam survived for an hour, scoring one not out in a partnership that lifted Bangladesh to a respectable total. The stand with Rahim was a last-wicket record for their country against South Africa.
Earlier, Zunaed Siddique struck 67 before a rampant Makhaya Ntini (four for 32) removed him after tea thanks to a spectacular catch by McKenzie in the gully.
Siddique drove stylishly down the ground and cut with power to collect 11 fours.
He was given a life on 19 when wicketkeeper Mark Boucher dived in front of first slip and dropped him off Morne Morkel's bowling.
Shakib Al Hasan also made a brisk 30 before dragging a wide half-volley from Morkel back into his stumps.
Morkel produced a lively spell to take four for 73, perfectly complimenting fellow paceman Ntini.
Siddique had a spell when he was on top as he shared a stand of 51 for the fifth wicket with Raqibul, who was out for 15 when he got into a tangle from a lifting delivery by Morkel and offered a simple catch to Graeme Smith at first slip.
South Africa are 1-0 up in the series.