Morne Morkel produced a devastating early burst before sustaining an injury as South Africa closed in on victory in the first Test against Bangladesh on a rain-affected fourth day at Senwes Park.
Faf du Plessis (81) declared on 247-6 after the captain and Temba Bavuma (71) made half-centuries in Potchefstroom on Sunday, setting the tourists a highly unlikely 424 to win.
Morkel (2-19) dismissed Tamim Iqbal and Mominul Haque in the first over to leave the Tigers two down without a run on the board and Keshav Maharaj removed Imrul Kayes (32) with what proved to be the last ball of the day.
No play was possible after tea due to rain, so the tourists will resume on 49-3 on the final day, needing another 375 for victory but more realistically having three sessions to bat out.
The Proteas will have to do without paceman Morkel, who will undergo scans on Monday to determine the extent of a side strain.
Mustafizur Rahman (2-30) had Hashim Amla (28) caught behind after South Africa resumed on 54-2 and Bavuma was given a life on eight when Kayes put him down at backward point off Shafiul Islam.
Bavuma set about making Kayes pay, finding the boundary with increasing regularity and Du Plessis played his shots, sweeping Mehedi Hasan for six before bringing up a 55-ball half-century.
An elegant cover drive off Sabbir Rahman enabled Bavuma to reach his ninth Test fifty as the runs continued to flow in the morning session, South Africa going in at lunch on 203-3.
Du Plessis missed out on a century when Mominul (3-27) trapped him leg before to end a stand of 142, the same bowler also getting rid of Bavuma and Quinton de Kock (8) in quick succession following a rain delay.
Maharaj made a brisk 19 before Du Plessis declared and Morkel gave South Africa a dream start when Bangladesh's second innings got under way, cleaning up the dangerous Tamim and also getting Mominul lbw in a brilliant first over.
Morkel thought he had the Tigers deeper in the mire at 6-3 when he bowled Mushfiqur Rahim, but the big paceman overstepped and Du Plessis dropped Kayes on six at second slip off Kagiso Rabada.
There was a blow for South Africa when Morkel went off after bowling two balls of an over and was unable to return, but Maharaj had Kayes caught behind right on the stroke of tea and no further play was possible after the rain returned.