Kallis hit his 41st Test century and Peterson his second as South Africa ended the day perfectly placed at 347 for three after being posted in to bat. Kallis, playing in his 150th Test match (the sixth player to achieve the feat), was unbeaten on 159 at stumps, his 215-ball innings including of 21 boundaries and a maximum. It was a victorious return to form for the 36-year-old, playing on his home town ground after making the first 'pair' of his career during South Africa's defeat in the second Test in Durban.
Fast bowler Dhammika Prasad, swapping the injured Dilhara Fernando, had early success for Sri Lanka, dismissing South African captain Graeme Smith for 16 with his first ball of the match and following up with the wicket of Hashim Amla also for 16.
But Petersen, making his first look of the series, played an assured innings as he and Kallis took command during a record South African third wicket partnership against Sri Lanka, one that gave the home team 205 runs.
The Sri Lankans hardly ever looked likely to take a wicket and they lost their allocation of reviews when umpire Richard Kettleborough twice gave Kallis not out when Chanaka Welegedera appealed for leg before wicket decisions. On both occasions the umpire was shown to be right.
Only one wicket fell in the final session when Chanaka Welegedera had Petersen caught by Dilshan.
However, Kallis and AB De Villiers (45) ensured the visitor's pleasure was shortlived with an unbeaten 86-run stand for the fourth wicket.