Cape Town: Dean Elgar hit a career-best 129 to guide South Africa through a demanding first day of the second test against Sri Lanka at Newlands on Monday.
Elgar's century allowed the home side to reach stumps on a solid 297/6 after it had lost the toss and been asked to bat on an overcast and muggy morning that offered plenty of assistance to Sri Lanka's seamers.
The left-hander remained steadfast against the swinging ball early on, before scoring more freely when the sun came out later in the day and the pitch improved.
Although Elgar lost opening partner Stephen Cook to the fourth ball of the day, he shared in a 66-run stand for the second wicket with Hashim Amla (29), then added 76 with captain Faf du Plessis (38) for the fourth wicket.
While Amla was bowled by a quick delivery from teenage fast bowler Lahiru Kumara, who dismissed JP Duminy for a duck in the same over, Du Plessis was guilty of throwing his wicket away shortly before tea.
The South African captain had already been dropped off the bowling of Rangana Herath when he played an expansive drive at a turning delivery and was caught at slip.
When Temba Bavuma (10) was done for pace by Kumara's bouncer, South Africa was 169-5 and in danger of being dismissed cheaply.
Instead Quinton de Kock played a typically aggressive knock, scoring at close to a run-a-ball in the early stages.
Elgar also began to score more freely in the lead-up to his century, and the pair went on to record a partnership of 103 in less than 24 overs.
Elgar eventually fell to the second new ball when a tired stroke saw him caught behind off the bowling of Suranga Lakmal, but De Kock continued his assault and reached the close unbeaten on 68.
Click here for scorecard and commentary