COLOMBO, Sri Lanka: South Africa captain Hashim Amla scored his 22nd test century on Saturday to steer the visitors away from the risk of a follow-on and to 234-7 at tea on day three of the second test against Sri Lanka.
Amla was unbeaten on 119 at the break, with Dale Steyn on 18, with South Africa still 187 runs short of Sri Lanka's first innings of 421.
Amla's patient innings took more than six and half hours, 300 deliveries and 12 boundaries. Other than a sharp chance on 93 which Dilruwan Perera dropped him off seam bowler Suranga Lakmal, Amla's innings was unblemished.
Sri Lanka off spinner Perera had 4-58. Left-arm spinner Rangana Herath had 2-48.
Resuming at 163-5 after lunch, J.P. Duminy was dismissed for three stumped by Niroshan Dickwella off Herath.
Duminy charged down to hit Herath but missed the ball and debutant Dickwella collected the ball off Duminy's pads and broke the stumps.
Vernon Philander was beaten by flight to a Perera delivery and was bowled between bat and pad.
At the time South Africa was still 18 runs from avoiding the follow-on with only three wickets in hand, but Amla and Steyn negotiated the required runs.
Perera captured two wickets in three deliveries in the morning session to spoil South Africa's recovery after being restricted to 71-3 on the second day.
Resuming Saturday on 98-3, Amla and A.B. de Villiers added 52 runs before Perera trapped De Villiers lbw for 37.
The dismissal ended a 79-run partnership for the fourth wicket.
Perera then bowled Quinton de Kock for a duck two deliveries later with a ball that drifted into the left hander.