Hashim Amla faced a stern test of character in his first series as captain after South Africa lost three key wickets against a determined Sri Lankan bowling attack in the second Test Friday.
Amla, 31, dug in with a painstaking 46 off 134 balls as South Africa trailed the hosts by 323 runs with seven wickets in hand on the second day of the Test at the SSC ground in Colombo.
At stumps, South Africa were 98-3 with AB de Villiers (11) being the other not out batsman at the crease.
Amla is leading the South African team for the first time in this two-Test series after being named captain last month following the retirement of Graeme Smith.
With the wicket showing signs of deteriorating, Amla and his men now face an uphill task to put up a fighting total on the board.
Sri Lanka posted 421 in their first innings, thanks to a solid 165-run knock by Mahela Jayawardene and a defiant 72 by Test debutant Niroshan Dickwella.
South Africa were off to a shaky start in their first innings, losing their openers inside the first nine overs before seamer Suranga Lakmal sent back Faf du Plessis for a fighting 36.
Left-arm spinner Rangana Herath gave the side an early breakthrough when he caught opener Alviro Petersen off his own bowling in the second over for two.
Dean Elgar (one) followed suit, inside-edging off-spinner Dilruwan Perera to short leg where Kaushal Silva dived forward to take a sharp catch.
Amla and du Plessis tried to rebuild the innings with some patient batting but Lakmal broke their 58-run stand half an hour before close.
Du Plessis tried to swing a widish delivery from Lakmal but edged it to Dickwella who dived to his left to take a one-handed catch just inches off the ground.
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 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.