Earlier, Bangladesh's hope of avoiding follow on was hanging on by a thread after losing Mushfiqur Rahim and Yasir Ali in the morning session of Day 3 and reaching 210-7 at Lunch.
Bangladesh needed another 44 runs to avoid follow on but they could only muster seven runs in the post-Lunch session.
Simon Harmer and Wiaan Mulder took three wickets each while Duanne Olivier and Keshav Maharah bagged two wickets each.
Bangladesh resumed the day’s play on 139-5 with Mushfiq and Yasir unbeaten on 30 and eight respectively.
Bangladesh were still trailing South Africa by 314 and needed another 115 runs to avoid follow on.
The match started 20 minutes later due to rain. When play started, Bangladesh started showing signs of a fight back from the very first over as Yasir struck a hat-trick of boundaries off Lizaad WIlliams to start the day.
Mushfiq and Yasir continued showing measured aggression by hitting boundaries when the opportunity presented itself.
Yasir ended up giving a return catch to Maharaja to fall two runs short of what would’ve been his second Test fifty.
Yasir had survived a review taken by South Africa for leg-before wicket in the same over, but in the end paid the price for not playing with a straight bat on a pitch that is offering considerable turn for left-arm spinner Maharaj.
Mushfiq kept battling with Miraz at the other end and reached his 25th Test fifty.