Wiaan Mulder joined the wicket-taking party after tea when he removed Mehidy Hasan Miraz (28), and he was joined by Duanne Olivier who was responsible for the demise of Khaled Ahmed without scoring.
The last wicket to fall for Bangladesh was their star man of the day Mahmudul who missed out on an opportunity to carry his bat as he was caught at slip by Harmer off Williams.
During his successful stay at the crease since the Tigers started batting on Friday afternoon, Mahmudul was involved in significant partnerships of 55 off 150 with Najmul Hossain and of 82 off 171 with Liton Das.
When SA bowled out Bangladesh during the third session, they enjoyed a lead of 69 runs and it increased slightly to 75 when stumps were called early due to bad light.
The Proteas will continue on day four on Sunday with Elgar on three and his partner Erwee on two and looking to significantly increase their advantage and possibly take the game away from Bangladesh.
The advantage of scoring a big second innings lead is possible for SA because they still have capable batters like Keegan Petersen, Temba Bavuma, Ryan Rickelton, Kyle Verreynne and Wiaan Mulder in the bank.
For them to get what they desire on Sunday, the SA batters will have to deal with the Bangladesh bowling attack that has already proved too be skilful.
Bangladeshi bowlers Taskin Ahmed, Ebadot Hossain, Khaled Ahmed, Mehidy Hasan Miraz and Mominul Haque will fancy their chances because of the nature of the wicket that has produced good competition between bat and ball.
Conditions may even work in Bangladesh’s favour as the pitch started to turn during the third session but the South Africans should be able to handle whatever is going to be thrown at them on Sunday.
Support independent journalism by subscribing to the Sunday Times. Just R20 for the first month.