Bangladesh took four quick wickets to slow South Africa's onslaught on the second day of the second and final Test here on Saturday.
Bangladesh paceman Shahadat Hossain took three wickets off three successive overs while Shakib Al Hasan accounted for one.
At tea, South Africa were 570-5 with the prolific Jacques Kallis batting on 35 and Marck Boucher on 16.
Hossain struck in the second over after lunch, sending back opener Neil McKenzie but not before the batsman had hit his maiden double Test ton.
McKenzie chopped one on to his stumps while trying to play a shot to the third man. His 226-run knock, containing 28 fours and three sixes, came off 388 balls in 525 minutes.
Hashim Amla (38) departed with just one run being added to the total when he was trapped plumb in front of a ball that appeared to reverse swing.
Ashwell Prince fell in a fashion similar to McKenzie, inside edging on to the stumps to Hossain for two.
Shakib then bowled A.B. de Villiers with a straighter one, South Africa losing their four wickets with the addition of just 10 runs to the total.
The effort by the Bangladeshi bowlers however came a little too late in the day as skipper Graeme Smith and Mckenzie had already set their team on course for a huge total with their record opening stand.
The duo broke the world record of 413 runs for the best opening stand, which was held by India's Pankaj Roy and Vinoo Mankad against New Zealand in 1956.
The South Africans' mammoth 415-run stand was finally broken when Smith was bowled by Abdur Razzaq for a 277-ball 232, including 33 fours and a six.
It was only the second time both openers had made double centuries in an innings. Only Australia's Bill Lawry (210) and Bobby Simpson (201) had achieved the feat, against West Indies at Bridgetown in 1964-65.
South Africa lead the two-Test series 1-0 after winning the opener in Dhaka by five wickets.