Despite a fightback from Mominul Haque and Taijul Islam, with a 103-run stand, Bangladesh ended up on 159, giving up a 416-run lead to South Africa, who have decided to enforce a follow-on.
Mominul scored 82 before falling prey to Senuran Muthusamy. Taijul posted 30. Keshav Maharaj dismissed him.
By lunch, Bangladesh were batting at 137 for eight wickets, with Mominul remaining not out for 74 and Taijul Islam for 18.
They forged out a 103-run stand in the ninth wicket, offering a fightback to South Africa, who had been in command in this Test since day one.
The wicket suddenly started to look flat to make the batter play easily. But at the start of the day, there were cracks on the wicket, as the legendary South African pacer Shaun Pollock said to the broadcaster in the morning.
Bangladesh vs South Africa test: Mominul fights back after Rabada takes five-for
Rabada had already taken two wickets on Wednesday. He took three more in the first season of day three.
Rabada first trapped Bangladesh captain Najmul Hossain Shanto with an angling delivery that was going away lately. Shanto prodded it to the wicketkeeper. Mushfiqur Rahim fell to a soft dismissal in the next over while driving to the mid-wicket. He just flicked it straight to the fielder at the mid-off.
In his next over, Rabada took two wickets in three balls. Mehidy Hasan Miraz edged to the wicketkeeper off an outside-off delivery, and then Rabada trapped Mahidul Islam lbw for a duck.
Bangladesh lost the first Test in Dhaka and are now on the verge of another defeat unless they create any unlikely history in the second innings.
Bangladesh played 24 Tests in Chattogram, with two wins, seven draws, and defeats in all others.