Skipper Hashim Amla was batting on 77 and Jean-Paul Duminy was on three.
South Africa, who won the opening Test in Galle, trail Sri Lanka by 258 runs in the series decider, with five wickets in hand.