Durban - The Proteas have not had it all their own way, but they remain on course to beat Sri Lanka in the first of two Tests at Kingsmead.
At the close of play on day two on Thursday, South Africa were 126/4 in their second innings, giving them a lead of 170 going into day three.
Skipper Faf du Plessis (25*) and Quinton de Kock (15*) are at the crease for the hosts on a day that saw a total of 13 wickets fall with the bowlers dominant once more.
This Kingsmead wicket is a good one.
While there is lateral assistance for the seamers, there are no issues over inconsistent bounce and runs are on offer for the batsmen that apply themselves.
Sri Lanka would have felt good about their chances when they resumed their first innings on 49/1 at the start of the day, but Dale Steyn and the Proteas quicks had other ideas.
Steyn was the star for the Proteas with figures of 4/48 and any worries over his fitness were extinguished when he bowled 10 overs on the trot after lunch - and 20 in total - in search of his first five-wicket haul since 2016.
Steyn, Kagiso Rabada (2/48) and Duanne Olivier (1/36) all favoured the short ball in looking to knock over the Sri Lankans, and while there was some resistance from the visitors, they never looked comfortable against that aggressive approach.
Kusal Perera top-scored with a breezy 51 from 63, but he played one shot too many before finding substitute fielder Zubayr Hamza at deep extra cover off Steyn.
There was also a brave 32-run stand for the ninth wicket between Kasun Rajitha (12) and Lasith Embuldeniya (24) that was ended by a stunning piece of fielding from Aiden Markram.
The Proteas opening batsman, fielding at short leg off Rabada, showed incredible reflexes to pounce on and grab a prod from Rajitha before running the stunned batsman out in spectacular fashion.
Sri Lanka were eventually dismissed for 191, giving the hosts a handy 44-run lead when they started their second dig after tea.
Dean Elgar and Markram got the Proteas off to a confident start, with Markram looking to be positive.
After an encouraging 36-run opening stand, Markram had only himself to blame when he played loosely at a delivery from Kasun Rajitha to edge to second slip and be dismissed for 28 from just 31 balls.
Hashim Amla's worries then continued when he failed for the second time in the Test, cutting Vishwa Fernando to gully to be sent packing for 16.
Temba Bavuma, so composed in the first innings where he was unluckily run out for 47, then misjudged an attempted sweep off left-arm spinner Embuldeniya to be trapped LBW for 3.
Elgar, though, bounced back from his first-innings duck and looked to be playing an innings of resilience that has become a familiar sight over the years.
That was until he got to 35 and came down the track to Embuldeniya, belting the ball back to the left-arm spinner, who took a superb catch off his own bowling.
At that stage, South Africa were 95/4 with a lead of 139 and Sri Lanka had earned themselves a sniff.
Du Plessis and De Kock, South Africa's last two specialist batsmen, got through to the end of the day unscathed and if they can get through the first hour on Friday morning, then South Africa should have enough on the board to get the job done.
It will not be easy.
Sri Lanka's seamers have been impressive throughout the Test match and, in the final session on Thursday, Embuldeniya (2/36) was getting purchase and landing the ball in good areas with his spin.
The visitors, against all odds, are still in this.
Play starts at 10:00 on Friday.