Opener Tharanga Paranavitana was bowled for 32 by Vernon Philander just before the break at Super Sport Park to put the Proteas narrowly on top in the series opener following the early dismissals of Sri Lanka captain Tillakaratne Dilshan and Kumar Sangakkara.
Paranavitana and Mahela Jayawardene (23 not out) produced a gutsy half-century partnership after those two wickets fell in the space of four balls to leave the tourists 12-2 early in the first session.
Philander shattered Paranavitana's stumps 15 minutes before the break as South Africa sought to take advantage of the lively surface at Centurion.