Opener Dean Elgar notched a superb 103 on Wednesday as South Africa reached 268-5 on the opening day of the first test against Sri Lanka.
Elgar dominated both pace and spin bowling to smash 11 fours and three sixes during his 187-ball knock and was supported well by Faf du Plessis, who struck a fine 80 coming in at No.3.
Elgar batted just over two sessions to bring up his second test century.
At stumps, wicketkeeper Quinton de Kock was batting on 17 and Dale Steyn was yet to score.
Early strikes
The left-handed Elgar seized the early initiative with free strokes against the seam bowlers and good use of the feet against spinners.
The pair (Elgar and du Plessis) added 125 runs for the second wicket after Elgar and Alviro Petersen had put on 70 in their opening stand.
Elgar got to the three-figure mark with a six to long-on off Dilruwan Perera to move from 96 to 102. He was caught behind swishing at a delivery from seam bowler Suranga Lakmal, who bagged two wickets in the last session.
South Africa had looked set to end the day in a better position but lost new captain Hashim Amla for 11 with du Plessis and A.B. de Villiers (21) also following him as South Africa slipped from 195-1 to 266-5.
du Plessis was well set, striking five fours and a six but was caught at short leg off Dilruwan Perera to give Sri Lanka the window of opportunity.
Earlier, Petersen was trapped leg before by Perera with a straight delivery after striking four fours off 46 deliveries.
Amla debuts as captain
This is the first test for South Africa after the retirement of Graeme Smith. Amla became only the second non-white captain of South Africa after Ashwell Prince, and the first to be appointed as a permanent skipper.
South Africa won a preceding one-day series 2-1 under de Villiers, who is playing in this match as a specialist batsman due to a hamstring injury with de Kock to keep wickets.