Faf du Plessis made a career-best 199 as South Africa prospered in the first Test against injury-hit Sri Lanka with a massive first-innings score of 621 and a lead of 160 on day three on Monday.
Sri Lanka closed on 65 for two in their second innings with Kusal Mendis (33 not out) and Dinesh Chandimal (21 not out) at the crease, but are effectively five wickets down with team officials revealing that injured Kasun Rajitha, Lahiru Kumara and Dhananjaya de Silva will not bat.
There is also a concern for Chandimal, who needed treatment on his thigh and looked in some discomfort.
Home seamer Lungi Ngidi (2-28) picked up both wickets to fall, bowling captain Dimuth Karunaratne (6) with a delivery that kept low, before Kusal Mendis (0) edged to slip.
Du Plessis fell short of a major milestone with a poor selection of shot as he attempted to lift leg-spinner Wanindu Hasaranga (4-171) over mid-on, but instead offered a simple catch to Karunaratne.
He faced 276 balls and hit 24 fours, a masterful display of batting on a wicket that was not easy for batsmen with pace and variable bounce.
Sri Lanka had toiled in the field as injuries severely hampered their bowling attack, with seamer Rajitha managing only 2.1 overs, fellow quick Kumara forced off early and Hasaranga limping along after a sliding save on the boundary.
They had started the innings without spinner De Silva, who suffered a thigh injury while batting and has been ruled out for two weeks.
South Africa had resumed on 317 for four, with Du Plessis and Temba Bavuma (71) sharing a record fifth-wicket stand for the team against Sri Lanka of 179.
It was broken in bizarre circumstances when Bavuma walked from the field following an appeal for caught behind. He was not given out by the umpire, and replays suggested he had missed the ball by a good inch.
Du Plessis also put on a record seventh-wicket stand against Sri Lanka of 133 with Keshav Maharaj (73), who went to his highest Test score before he was the last batsman out.