Sri Lanka grab early wickets to seize control of Colombo Test
Sri Lanka batsman Niroshan Dickwella (R) is congratulated by teammate Mahela Jayawardene in Colombo on July 25, 2014 - by Ishara S. Kodikara
The spin duo got rid of South African openers Dean Elgar (one) and Alviro Petersen (two) after Sri Lanka's first innings folded up on 421 shortly into the second session.
At tea, South Africa were 23-2 with Faf du Plessis batting on 17 and new Test skipper Hashim Amla on two.
South Africa were dealt an early blow when left-arm spinner Herath caught Petersen off his own bowling in the second over of the innings.
Elgar followed suit, inside-edging off-spinner Perera to short leg where Kaushal Silva dived forward to take a sharp catch.
Sri Lanka's first innings was built around a solid 165 by Mahela Jayawardene and a defiant 72-run knock on debut by Niroshan Dickwella.
South Africa wrapped up the Sri Lankan innings in the second session, starting with the dismissal of Perera who lobbed a simple catch to Amla off leg-spinner Imran Tahir (1-121).
Sri Lanka lost their second wicket to a run-out dismissal when Dickwella failed to make his ground while taking a cheeky single. Dickwella hit one six and eight fours in his 116-ball 72.
Vernon Philander then had Ajantha Mendis and Suranga Lakmal caught behind in successive overs to bring an end to the Sri Lankan first innings.
The first session belonged to Jayawardene and Dickwella who shared a rollicking 100-run stand for the sixth wicket.
Jayawardene, due to quit Test cricket next month, hit 17 fours and a six during his nearly eight-hour stay at the wicket before being run out by a direct hit from Petersen about 30 minutes from lunch.
It was Dickwella who dominated the bowlers initially when Sri Lanka resumed at their overnight 305-5, driving and cutting South African fast bowlers for fours to belie his status as a Test debutant.
Jayawardene too picked up the pace, reaching the 150-run mark with a single to long leg off Dale Steyn.
The South African quicks struggled to make the new ball count in the crucial first hour, regularly pitching in loose balls that were promptly dispatched to the fence.
Morne Morkel's short balls were hit for two fours on the trot by Dickwella, the batsman arching back slightly and ramping the second one high over the slip cordon.
The attritional first hour saw Morkel lose his cool and push away Dickwella as he was trying to take a run but the bowler apologised immediately.
Unruffled, Dickwella went on to complete his debut Test fifty with three runs off a full toss from Morkel that he nudged it to the mid-on region.
South Africa lead the two-Test series 1-0 after winning the first match in Galle by 153 runs.