Proteas in charge following Bangladesh collapse
South Africa strengthened their hold on the first Test with Bangladesh by securing a substantial first-innings lead on day three in Potchefstroom.
Mominul Haque and Mahmudullah hit 77 and 66 respectively to ensure the tourists avoided the follow-on, but a lower-order collapse saw Bangladesh slide from 292-5 to 320 all out.
That gave the Proteas an advantage of 176, which they improved to 230 by stumps for the loss of two wickets - openers Dean Elgar and Aiden Markram.
Bangladesh made an encouraging start on Saturday, with Tamim Iqbal (39) the only man to depart in the morning session despite some superb bowling from Kagiso Rabada and Morne Morkel.
Tamim survived two reviews for leg before wicket off Rabada, while Mominul was lucky not to be adjudged lbw to the same bowler on 28 as Morkel kept the pressure on at the other end.
A stunning one-handed catch from Quinton de Kock eventually accounted for Tamim, who was strangled down the leg side to give Andile Phehlukwayo his maiden Test scalp.
Yet things continued to look good for Bangladesh as Mominul and Mahmudullah counter-attacked effectively, either side of the latter being dropped by De Kock off Keshav Maharaj when he had 26 to his name.
Maharaj was given reason to cheer after lunch when Markram showed superb reflexes at forward short-leg to end Mominul's 150-ball innings.
Another 65 runs were added for the sixth wicket by Mahmudullah and Sabbir Rahman. However, the latter's departure to Duanne Olivier triggered a significant shift in momentum.
Mahmudullah played on to the impressive Morkel immediately after the second new ball had been taken and the remaining wickets came quickly for South Africa.
Although Elgar (18) and Markram (15) failed to follow up their substantial first-innings scores, the hosts were firmly in control when bad light forced an early close, with Hashim Amla (17) and Temba Bavuma (3) unbeaten.