Simon Harmer titled the first Test between South Africa and Bangladesh in the Proteas' favour on day two in Durban.
South Africa ended day one on 233-4 with Temba Bavuma on 53.
Bavuma added 40 to his overnight score, falling seven runs shy of a century, but Harmer led South Africa's lower-order resistance with an unbeaten 38.
After the hosts were bowled out for 367, Harmer - returning after over six years away from the longest format - did significant damage with the ball, claiming all four wickets, including the scalp of captain Mominul Haque for a duck as the tourists reached stumps on 98-4.
Khaled Ahmed got Bangladesh into the lower order by removing Kyle Verreynne and Wiaan Mulder with successive deliveries, only for the tourists to then be frustrated by a partnership of 53 between Bavuma and Keshav Maharaj (19).
That stand was broken when Bavuma was undone by some sharp turn from Mehidy Hasan, who struck leg stump before Ebadot Hossain snuck the next delivery through the gap to dislodge Maharaj.
Harmer counter-attacked in style, hitting four fours and a six, and then continued to torment Bangladesh with ball in hand.
Shadman Islam went for nine as Harmer got one to keep low and clatter into middle stump and then exploited the turn to bowl Najmul Hossain Shanto for 38 with a ball that beat the outside edge.
Keegan Petersen's one-handed diving catch gave Harmer his third and the crucial wicket of Mominul and he then had Mushifqur Rahim caught behind for seven. Mahmudul Hasan Joy represents Bangladesh's best hope of a fightback, having reached stumps unbeaten on 44.
Harmer makes belated Test impact
Making his first Test appearance since 2015, Harmer, who curtailed his international career to sign a Kolpak deal with Essex in 2017, produced an high-quality demonstration of his quality. Thirty-eight represented a highest score with the bat in this his sixth Test, while he is on course to easily surpass his previous best innings figures of 4-61.
Harmer had claimed 4-42 at the close of play, bowling seven maidens in his 20 overs.
More misery for Mominul
Mominul's exit, though the product of a superb piece of fielding, meant he went for a duck in a second successive Test, having done so in the first innings against New Zealand in Christchurch in January.
The Bangladesh skipper has now produced a single-figure score in six of his nine innings in the longest format.