South Africa are 226 runs ahead of Sri Lanka at lunch during the fourth day of the first Test in Galle.
Sri Lanka were bowled out for 292 in their first innings and the South Africans have made a confident start in the second innings.
Sri Lanka came out to attack with spinners but were struggling to make the breakthrough until Dean Elgar threw his bat at one that took the inside edge, and Dinesh Chandimal grabbed a sharp catch.
With Elgar sent packing after 12 runs, Peterson was next to go after strong resistance.
Dilruwan Perera beat the right-hander who had prodded forward in defence. The ball brushed the bat and despite reviewing it, he was out.
The South Africans went into lunch at 63-2 with Hashim Amla and Faf du Plessis at the crease.