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 at Chittagong on Thursday.
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 match 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.
Das added 38 quick runs with Mohammad Shahid (25) for the seventh wicket to boost the lead and was eventually caught by wicketkeeper Quinton de Kock off spinner Simon Harmer.
Steyn (3-78) dismissed the last two Bangladesh batsmen to take his Test tally to 399 wickets. Harmer also finished with three wickets.
Scorecard
South Africa 1st innings
Bangladesh first innings (179-4overnight):
Tamim Iqbal b Elgar 57
Imrul Kayes st de Kock b van Zyl 26
Mominul Haque v Harmer 6
Mahmudullah lbw b Philander 67
Mushfiqur Rahim lbw b Steyn 28
Shakib Al Hasan c Duminy b Harmer 47
Litton Das c de Kock b Harmer 50
Mohammad Shahid c van Zyl b Philander 25
Taijul Islam c Elgar b Steyn 9
Mustafizur Rahman c Duminy b Steyn 3
Jubair Hossain not out 0
Extras: (LB-7, NB-1) 8
Total: (all out in 116.1 overs) 326
Fall of wickets: 1-46 (Imrul), 2-55 (Mominul), 3-144 (Tamim), 4-178 (Mahmudullah), 5-195 (Rahim), 6-277 (Shakib), 7-311(Shahid), 8-319 (Das), 9-325 (Taijul)
Bowling: Steyn 22.1-5-78-3, Philander 20-2-40-2, Morkel 19-2-52-0, Harmer 35-8-105-3, van Zyl 13-4-23-1, Elgar 3-0-6-1, Duminy 4-0-15-0
South Africa 2nd innings
S van Zyl not out 33
D Elgar not out 28
Total: (for no wicket in 21.1 overs) 61
Bowling: Mustafizur 5-0-21-0, Taijul 2-0-4-0, Mahmudullah 1-1-0-0, Shakib 5-0-19-0, Shahid 6-1-12-0, Jubair 2.1-1-5-0.
Image: Dale Steyn
Photograph: Dinuka Liyanawatte/Reuters