Cape Town - The Proteas are edging closer to victory in the second Test against Sri Lanka at Newlands.
At stumps on day three, the visitors were 130/4 chasing a mammoth 508 for victory that had been set when the Proteas declared on 224/7 about half-an-hour before tea.
STUMPS: SA V SRI LANKA, DAY 3
There were calls for the Proteas to declare earlier, but what captain Faf du Plessis has done is make the game completely safe.
South Africa now have two full days to take 6 wickets, but they will surely wrap up the Test and the series on Thursday.
Vernon Philander and Kagiso Rabada picked up two wickets apiece in Sri Lanka's second innings.
Philander knocked Dimuth Karunaratne's (6) leg stump out of the ground just before he had Kusal Mendis (4) caught by Dean Elgar in the slips, while Rabada got rid of Kaushal Silva (29) and Dhananjaya de Silva (22) to leave Sri Lanka in trouble at 69/4.
A gritty 56-run partnership between skipper Angelo Mathews (29*) and Dinesh Chandimal (28*) followed to see the Sri Lankans through to the end of the day without any more damage done.
One hope for the Proteas would have been for those struggling for runs - Hashim Amla, JP Duminy and Temba Bavuma - to play themselves back into form.
Unfortunately, that did not happen.
Having started the day 35/0, Stephen Cook and Dean Elgar added another 29 runs before Cook was sent packing when he edged to slip off a probing delivery from Suranga Lakmal to cap off a disappointing Test.
That brought Amla to the wicket, who lasted just five balls.
Lakmal was again the wicket-taker, taking his second wicket in the over when he found Amla's outside edge with another delivery that asked the right questions.
It means that Amla has now gone 10 knocks without a half century.
Elgar, meanwhile, kept ticking along.
He reached his 50 off 82 balls as he continued to cash in on his good form, while Duminy needed a review to save himself from an LBW shout that had originally been given out off the bowling of Nuwan Pradeep.
Elgar was out soon afterwards when he edged Rangana Herath to first slip in the spinner's first over.
Duminy was looking good for his 30, but he was given out LBW for a second time with what would prove to be the last ball of the session when he missed a straight one to become Lakmal's third victim.
Bavuma came in after lunch, but was out for 0 when he pushed Herath to mid-off and set off for a single that was never on. A direct hit from De Silva sent the Lions man on his way.
Quinton de Kock entertained briefly for 29 before he was caught behind off Lahiru Kumara while Du Plessis was caught behind off Lakmal for 41.
When Du Plessis did call for the declaration, Keshav Maharaj was 20* and Philander 15*.