A thrilling innings of 99 by AB de Villiers put South Africa in a strong position on the second day of the first Test against Sri Lanka at SuperSport Park on Friday.
On a day when batsmen continued to struggle on a difficult pitch, De Villiers played some sparkling strokes as South Africa reached 389 for nine at the close, a first innings lead of 209.
De Villiers needed only 135 balls to make his runs before playing one stroke too many to be caught by a diving substitute, Dimuth Karunaratne, off Thisara Perera.
He had hit an imperious on-drive for four off the previous delivery and then slashed a short ball hard towards backward point.
The crowd at his home ground had their cheers for his century cut short when Karunaratne flung himself to his left to hold the ball virtually as it went to ground. The umpires conferred before giving De Villiers out.
De Villiers needed only 44 balls to move from 51 to 99. He hit 12 fours. On a pitch with seam movement and uneven bounce it was an innings which compared favourably with most of his 12 Test centuries.
After being bowled out for 180 on the first day, Sri Lanka competed well in hot conditions until a sixth wicket partnership of 97 between De Villiers and Ashwell Prince (39) put the home side firmly in control.
Prince was dropped twice as the Sri Lankan fielders failed to match the efforts of their bowlers.
Star South African batsman Jacques Kallis was the most notable victim of a pitch with uneven bounce. Shortly before lunch he ducked into a bouncer from Dilhara Fernando, which barely rose above stump height, and took a heavy blow on the left earpiece of his batting helmet.
He collapsed next to the pitch but after receiving treatment for seven minutes he carried on batting.
He was on 25 when he was hit, on 27 when he was dropped by wicketkeeper Kaushal Silva off Fernando and was out for 31 shortly after lunch, caught at third slip off Chanaka Welegedera.
Silva also dropped Prince, on 26, when the batsman got a thick edge to an attempted cut off left-arm spinner Rangana Herath. Prince earlier survived a chance to Thisara Perera at backward point off the luckless Fernando when he was on 23.
Perera struck two important blows for the tourists in the morning, having Hashim Amla (18) and Jacques Rudolph (44) caught in the slips.
But he was struck for three fours in an over by Kallis soon afterwards. Kallis looked South Africa's most accomplished batsman before his injury.
Rudolph, batting with a splint on his left little finger after suffering a dislocation while fielding on Thursday, battled for 229 minutes and 140 balls for his 44.
The Sri Lankans wilted towards the close, notably in an unbeaten last wicket stand of 39 between Mark Boucher (49 not out) and Imran Tahir (24 not out).
Perera finished with three for 114, while Welegedera took two for 87.