South Africa made a sedate start to their second-innings after conceding a 78-run first innings lead to a spirited Bangladesh on day three of the opening Test in Chittagong.
Stiaan van Zyle was batting on 33 with Dean Elgar (28) at the other end when rain forced early stumps for the second consecutive day with South Africa on 61 without loss.
Elgar twice charged out to hit spinner Shakib Al Hasan for a couple of boundaries in the same over but apart from that it was a watchful period for the two openers as walked off with their side 17 runs behind the hosts.
Earlier, a maiden half-century from wicketkeeper-batsman Liton Das helped Bangladesh overtake South Africa's first innings total of 248 in the first of the two-Test series at the Zahur Ahmed Chowdhury Stadium.
Playing his second Test, Das was out for 50 as the hosts were dismissed for 326 shortly before tea after resuming on 179-4 against their top-ranked opponents.
Das and all-rounder Shakib (47) added 82 for the sixth wicket after Bangladesh, who had stunned the tourists 2-1 in the preceding ODI series, lost captain Mushfiqur Rahim to Dale Steyn for 28.
Rahim was dismissed leg-before when South Africa captain Hashim Amla challenged the umpire's original not-out verdict and managed to get it overturned.
Shakib and Das batted resolutely before steering Bangladesh, who have lost all of their previous eight meetings against South Africa, past their opponents' first-innings total.
Steyn (3-78) took his Test tally to 399 wickets. Harmer also finished with three wickets.
South Africa 248 all out and 61-0 (Zyl 33, Islam 0-4)
Bangladesh 326 all out (Mahmudullah 67, Steyn 3-78)