Jacques Kallis marked his 150th Test by joining the elite band of players to have made centuries against every Test-playing nation as South Africa took control against Sri Lanka.
Jacques Kallis century lifts the Proteas
The Proteas were put in to bat in the series-deciding third Test but a stand of 205 between Kallis and Alviro Petersen led them to 347 for three by the close.
"In his 150th test match he really played the way South Africa has come to know him," Petersen said of his teammate. "Full credit must go to him."
Tillakaratne Dilshan, the Sri Lanka captain, would have been frustrated by his bowlers' display on a batsman-friendly surface, and they will have to show an improvement today to prevent South Africa building an impenetrable lead.
"We didn't bowl well, especially the first session. We let them go. We lost the grip," said Champaka Ramanayake, the Sri Lanka bowling coach. "We thought the wicket would do something but it didn't do as we expected. But there's another day tomorrow, and we can come back."
Graeme Smith, the home captain, set the tone early on with three boundaries but Dhammika Prasad bowled him and then trapped Hashim Amla lbw, both for 16, to leave South Africa in slight trouble on 56 for two.
Kallis then joined Petersen and their century partnership came up in just 113 balls. The pair soon passed their country's third-wicket record against Sri Lanka of 140 - previously held by Kallis and Herschelle Gibbs.
Kallis reached his century in 114 balls.
Petersen had been fortunate not to be run out, when he was sent back after rashly setting off for a single which would have taken his partner to his hundred, and also narrowly missed a loose slash at Angelo Mathews off the last ball before tea as he remained 99 not out.
Petersen finally reached his hundred with a single off Rangana Herath, from 165 balls with 12 fours and a six.
The partnership reached 200 before Petersen was out when a loose shot outside off stump was well caught by a diving Dilshan.
New man AB de Villiers made a slow start as Sri Lanka belatedly began to slow the run rate, but he moved into double figures with a straight drive for four.
De Villiers reached 45 not out by the close but the day belonged to Kallis, who will resume on 159 when play begins Wednesday.