Jean-Paul Duminy hit a superb unbeaten century to put South Africa in a position of strength on the second day of the first Test against Sri Lanka on Thursday. (Scorecard)
The left-hander came in to bat with South Africa placed at a shaky 331-7 but he batted sensibly under pressure to help his side declare their first innings at 455-9.
In reply, Sri Lanka were 30-0 when stumps were drawn for the day with Kaushal Silva batting on eight and Upul Tharanga on 20.
Tharanga, playing his first Test in six years, showed little signs of nervousness, hitting four boundaries in his 40-ball innings so far.
The Sri Lankan bowlers were made to toil in hot and humid conditions by the gritty rival batsmen who dug in to ensure their team did not lose the advantage of winning the toss and batting first on a placid track at the Galle International Stadium.
It was Duminy (100 not out) who stole the show with a superb rearguard action after opener Dean Elgar had laid the foundation for a good total with a 103-run knock on day one.
Duminy, 30, frustrated the bowlers to take South Africa past the 400-run mark. His 206-ball effort contained 10 hits to the boundary including an exquisite cover drive off skipper Angelo Mathews.
Mathews had to give himself the ball in the absence of pace spearhead Shaminda Eranga who remained off the field with a split webbing in his bowling hand.
Duminy, dropped on 82 by Dilruwan Perera, was given a standing ovation from his mates in the dressing room after he completed his fourth Test century.
He shared valuable partnerships with tailenders Vernon Philander and Morne Morkel (22) whose dismissal in the 167th over prompted new South African skipper Hashim Amla to declare the innings.
Philander (27) was adjudged leg before wicket off Mathews but the batsman asked for a review as he felt the ball had hit him high on the pads. However, Hawk Eye upheld the on-field umpire's call.
He faced 96 balls and shared 75 runs for the eighth wicket with Duminy.
The morning session belonged to Quinton de Kock who hit a maiden Test 50 after resuming the day at his overnight score of 17.
The rookie batsman, playing his second Test after making his debut in February, hit six fours in his promising 90-ball innings.
A smashing cover-drive off slow bowler Dilruwan Perera (3-147) and another through point that raced to the boundary were the highlights of his innings.
But Perera earned his revenge when he sent back De Kock with a sharp turning delivery that the batsman edged in the slips to give Mahela Jayawardene his 198th catch.
The second and final Test will be played in Colombo from July 24-28.