Late revival helps Sri Lanka recover in first Test after Dean Elgar century
Left-hander Elgar smashed 11 fours and three sixes on his way to 103 on the opening day at the Galle International Stadium on Wednesday.
Faf du Plessis, batting at three for the first time in a Test, was too in impressive form. He contributed a fine knock of 80, and put on 125 with Elgar for the second wicket.
The duo had helped South Africa to 194-1 at tea, but Sri Lanka took four wickets for just 71 runs in the final session to leave the visitors 268-5 at stumps.
Earlier, Hashim Amla - making his debut as South Africa Test captain - won the toss and opted to bat on a relatively flat pitch, and that decision paid immediate dividends with Alviro Petersen (34) and Elgar regularly finding the boundary.
The two put on 70 for the opening wicket, until Petersen was trapped lbw by Dilruwan Perera, the decision confirmed following an unsuccessful appeal from the batsman.
That would prove Sri Lanka's only breakthrough of the first session, but they managed to limit South Africa to just 83 runs between lunch and tea, although Elgar did bring up his century with a huge six off Perera - in the process becoming the first South African opener to score a century on Sri Lankan soil.
Elgar, playing in his 10th Test, was finally dismissed when he edged Suranga Lakmal to wicketkeeper Dinesh Chandimal, but his form will be positive news for a side still in transition following the retirements of Graeme Smith, Mark Boucher and Jacques Kallis.
Amla, who starred in South Africa's recent 2-1 one-day series win over Sri Lanka, could only contribute 11 before Du Plessis edged Perera to Kaushal Silva at short leg.
And Sri Lanka further finished in the ascendancy when Lakmal bowled AB de Villiers (21) in the final ball of the 90th over.
South Africa will resume day two with Quinton de Kock (17 not out) and Dale Steyn (zero not out) at the crease, as the tourists seek a first Test series win in Sri Lanka for 21 years.