South Africa's Morne Morkel took two wickets in the first over of Bangladesh's second innings, heaping the pressure on the tourists in the first test as they limped to 49-3 at the end of Day 4 on Sunday facing an imposing target of 424.
Morkel bowled Tamim Iqbal for a duck in the fourth ball of the first over and had Mominul Haque out for 0 lbw off the sixth ball even though TV replays showed the ball was missing the stumps. Bangladesh, which missed a trick not to review Mominul's dismissal, was still 375 runs off the victory target at the close.
Bangladesh went to tea on 49-3 and no more play was possible afterwards as rain arrived with the teams inside for the break.
Captain Mushfiqur Rahim was 16 not out, having been given a second chance after he was bowled off a no-ball also by Morkel in his second over and the third over of Bangladesh's innings. The skipper will hold Bangladesh's hopes when it tries to save the game on the final day.
Imrul Kayes was out to spinner Keshav Maharaj for 32 to take the teams to tea and after also having survived a chance when he edged to South Africa skipper Faf du Plessis at second slip. Du Plessis dropped the chance to deny Kagiso Rabada an early wicket but it didn't cost South Africa too much.
The start could have been better for Morkel and worse for Bangladesh after he bowled Mushfiqur in the second ball of his second over, sending the middle stump cartwheeling out the ground. Morkel overstepped for a no ball, though, and Mushfiqur was called back.
In a tumultuous session for him, Morkel left the field a little later with what was later described as a side strain by the South African team, and his participation on the last day is in doubt.
Bangladesh, which has never won a test against South Africa, faces an uphill task at Senwes Park on Day 5 to avoid going 1-0 down in the short two-test series.
South Africa captain Du Plessis and Temba Bavuma earlier made half-centuries in a 142-run stand for the fourth wicket, scoring at a brisk rate and allowing the Proteas to declare their second innings on 247-6. Du Plessis made 81 and Bavuma 71, helping set Bangladesh a formidable target. The tourists' 320 in their first innings was already their highest test score in South Africa.