Potchefstroom: Dean Elgar fell one short of a double-century but that was only minor relief for Bangladesh as South Africa declared on 496-3 on day two of the first test on Friday.

Elgar’s career-best 199 was the anchor for South Africa to pile on the runs after being given the opportunity to bat first on a placid pitch in Potchefstroom.

Bangladesh were ruing that decision to bowl first as Elgar made a big century, Hashim Amla added 137, and opening batsman Aiden Markram made 97 on debut on the first day.

Captain Faf du Plessis (26 not out) and Temba Bavuma (31 not out) were at the crease when South Africa decided at the tea break that they had enough runs to put Bangladesh in. Du Plessis’ and Bavuma’s unbroken partnership was worth 51.

Bangladesh did manage two wickets in the day’s second session, their first success since Markram was run out just before tea on the first day.

Shafiul Islam had 1-74 and Mustafizur Rahman 1-98 for Bangladesh.

Elgar and Amla put on 215 for the second wicket, following on from the 196-run opening stand by Elgar and Markram.

Amla fell straight after lunch, caught at backward point. His 27th test century took him past West Indies’ Garry Sobers on the all-time list and level with Graeme Smith for the second-most hundreds by a South African. Jacques Kallis has 45 test centuries.

Elgar hit 15 fours and three sixes and is the leading run-scorer in test cricket this year following his ninth career ton and fourth of 2017.

He fell agonisingly short of 200, though, trying to play a hook off Rahman and lobbing a catch to Mominul Haque at midwicket.

South Africa and Bangladesh will play two tests, with the series Ottis Gibson’s first in charge of South Africa

Bangladesh were 127-3 in reply and trailed South Africa by 369 runs at stumps.