Kallis hit his 41st Test century and Peterson his second as South Africa ended the day comfortably placed at 347 for three after being sent 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 comprising of 21 boundaries and a maximum. It was a triumphant 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.
With the series tied at 1-1, Sri Lankan captain Tillekeratne Dilshan [ Images ] gambled by sending South Africa in. Hopes that a green-tinged pitch would help his fast bowlers were soon shown to be mistaken, while early morning cloud soon cleared on what became an ideal day for batting.
Fast bowler Dhammika Prasad, replacing the injured Dilhara Fernando, had early success for Sri Lanka [ Images ], dismissing South African captain Graeme Smith [ Images ] for 16 with his first ball of the match and following up with the wicket of Hashim Amla [ Images ], also for 16.
But Petersen, making his first appearance 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 yielded the home team 205 runs.
The Sri Lankans seldom looked likely to take a wicket and they squandered 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 [ Images ] (45) ensured the visitor's joy was shortlived with an unbeaten 86-run stand for the fourth wicket.