COLOMBO, Sri Lanka: Sri Lanka offspinner Dilruwan Perera took a career-best 5-69 to help dismiss South Africa for 282 in its first innings and give his team an overall 150-run lead in the second test on Saturday.
Hashim Amla finished unbeaten on 139 -- his 22nd test century -- but a lack of support from teammates meant conceding a big first innings lead to Sri Lanka.
The hosts made 421 in their first innings with Mahela Jayawardene top scoring with 165. After dismissing South Africa, Sri Lanka extended the 139-run lead to 150 by finishing 11-0 in its second innings at stumps on day three.
Amla's patient innings took more than eight hours with 382 deliveries.
Other than a sharp chance on 93 which Perera dropped off seam bowler Suranga Lakmal, Amla's innings was unblemished.
Perera's figures surpassed his previous best of 5-109 against Bangladesh earlier this year. Left-arm spinner Rangana Herath complimented him well with 4-71.
Resuming on 98-3, overnight batsmen Amla and A.B. de Villiers added 52 runs before Perera captured two wickets in three deliveries in the morning session to spoil South Africa's recovery.
First he got De Villiers lbw for 37 with a delivery round the stumps which straightened along the middle stump line. 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.
South Africa went to lunch on 163-5.
After the break 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 tailender Dale Steyn negotiated the required runs.
Steyn was dismissed for 30 in the third session.
Amla, along with his tailenders, tried to use up as many deliveries as possible as the Sinhalese Sports Club pitch showed signs of offering sharp turn to the spinners. South Africa, traditionally weak against spin bowling, could find it difficult to bat in the fourth innings.
Amla added 47 runs for the eighth wicket with Steyn off 117 deliveries and used 98 deliveries in a 28-run partnership with Imran Tahir.