South Africa declared their first innings on 575-6 on Wednesday after tea on day two of the second Test on a pitch offering little help to the Bangladeshi bowlers.
Tony de Zorzi top-scored with 177 while Tristan Stubbs (106) and Wiaan Mulder (105 not out) also hit their maiden Test centuries.
Left-arm spinner Taijul Islam collected his second five-wicket haul of the series for Bangladesh.
Earlier, Tony de Zorzi's commanding innings ended on 177 Wednesday as South Africa powered to 413-5 at lunch against Bangladesh on day two of the second and final Test.
Ryan Rickelton on 11 and Wiaan Mulder, with 12, were the not out batsmen at the break in Chattogram.
Left-arm spinner Taijul Islam pegged back the visitors with three wickets in three overs after flattening David Bedingham's leg stump to end a 116-run stand for the third wicket with De Zorzi with the score on 386.
Bedingham departed after a brisk 59 off 78 balls that contained two fours and four sixes.
His wicket prompted a mini-collapse as De Zorzi swiped across the line and was trapped lbw by Taijul to leave South Africa 391-4.
Wicketkeeper Kyle Verreynne, who made a century in the first Test win in Mirpur, lasted just three balls before being out without adding to the score, also leg before.
It gave Taijul his second five-wicket haul of the series.
De Zorzi had resumed on 141 out of South Africa's first day 307-2 after they won the toss and opted to bat on a pitch offering little help to the bowlers.
Having scored his maiden Test century on day one he soon brought up his first 150 off 235 balls with an 11th four.
In all, the opener scored four sixes and 12 fours in his Test-best 177, amassed off 269 balls.
Tristan Stubbs also struck a maiden Test century on Tuesday before departing on 106.
South Africa won the opening Test inside four days with fast bowler Kagiso Rabada taking 6-46 in the second innings.
Bangladesh have played 24 Tests in Chattogram but won only two with seven drawn.