The hosts limped to 245-7 at tea with tailenders Mohammad Rafique, batting on 10, and Mashrafe Mortaza (0) at the crease.
They still trail South Africa by 338 runs and need a further 139 to make the visitors bat again, a tall task given the fact that they have just three wickets left.
Compounding the misery for Bangladesh was the injury sustained by Aftab Ahmed, who was stretchered off and taken to hospital after the ball struck him in the cheek after getting through the gap in his helmet.
It was not yet clear whether he would come out to bat again although the physio said the injury did not appear to be serious.
South Africa struck in the first over after lunch when Dale Steyn (4-54) sent back Shahriar Nafees, who had hit him for two fours earlier in the over.
Nafees fished at a ball going outside off stump to offer an easy catch to skipper Graeme Smith at first slip. His 69-run knock came off 96 balls and contained 12 fours.
Steyn was unlucky not to get another wicket in his next over when Johan Botha dropped a sitter off Shakib Al Hasan at gully despite getting behind the line of the ball.
Mushfiqur Rahim was also lucky when Smith failed to take a regulation catch off Jacques Kallis.
The visitors finally tasted success when Makhaya Ntini, playing his 84th match, had Rahim caught behind for 15 to surpass Allan Donald's tally of 330 Test wickets and become the second most successful South African bowler ever.
The list is headed by the retired Shaun Pollock who has 421 wickets from 108 Tests.
Ntini also saw off Shakib who had earlier enjoyed a big slice of luck when he was caught off a no ball from Morne Morkel by Kallis at second slip.
South Africa lead the two-Test series 1-0 after winning the opener in Dhaka by five wickets.