Durban - There was admirable resistance from the Sri Lankan tail, but in the end the South African seam attack was too strong for the visitors as they were dismissed for 191 in their first innings on day two of the first Test at Kingsmead.
Dale Steyn, desperate for his first five-wicket haul since 2016, was the chief destroyer for the hosts as he finished with figures of 4/48 from 20 overs.
Steyn, as well as Duanne Olivier (1/36) and Kagiso Rabada (2/48), made life difficult for the Sri Lankans with a barrage of short-pitched bowling.
At tea on day two, the Proteas were yet to start their second innings and will do so in the evening session with a lead of 44.
The Sri Lankans, who lost five wickets in the opening session of the day to go into lunch at 133/6, added another 58 hard-fought runs in the middle session before Rabada brought the innings to a close as debutant Lasith Embuldeniya (24) was out looking to be aggressive.
There was earlier resistance from Kusal Perera, who carded a fine 51 before he fell looking to go after Steyn only to find substitute fielder Zubayr Hamza at deep extra cover.
Before that and shortly after lunch, Steyn had removed Suranga Lakmal (4) with a length delivery that was hit to Aiden Markram at cover.
Markram was also responsible for breaking a resilient ninth-wicket stand of 32 between Kasun Rajitha (12) and Embuldeniya.
The Proteas opening batsman, fielding at short leg, showed incredible reflexes to pounce on and grab a prod from Rajitha before running the batsman out in spectacular fashion.
Steyn, clearly keen on five wickets, bowled 10 overs on the trot in search of the scalp that would have seen him tie Stuart Broad on 437 Test wickets.
He would have got there had Dean Elgar not dropped an absolute sitter at gully, and Steyn could only shake his head and smile at that point.
Before lunch, Sri Lanka lost five wickets, having scored just 84 runs in the session.
The hosts went back to the opening pair of Steyn and Philander when play got underway, and it didn't take long for them to get the breakthrough.
Steyn, bowling at good speed under more cloudy skies, was first to strike when he had debutant Oshada Fernando out LBW for 19 in just his second over of the day.
Fernando had looked to work Steyn through the leg side and decided against the review after he had been given out by umpire Aleem Dar.
It proved to be a massive moment with replays revealing that the delivery was, in fact, missing leg stump comfortably and that Fernando would have survived had he asked for the review.
Philander (2/32) then joined the party in the very next over when he had skipper Dimuth Karunaratne trapped LBW for a well-played 30.
Karunaratne had survived a Philander review for LBW the ball before, but there was no escaping this one as replays showed the ball clipping leg stump.
At that stage Sri Lanka were in trouble at 53/3 having added just 4 runs to their overnight total and they were desperate for consolidation.
Philander, though, had other ideas.
'Big Vern' had his second when the experienced Kusal Mendis edged him to Faf du Plessis at second slip with one of those probing deliveries that the batsman simply had to stab at.
The dangerous and innovative Niroshan Dickwella was next to fall when he misjudged a pull shot off Olivier only to top edge to Steyn, who was standing off the fence at the finest of third mans.
That left the visitors on 90/5.
There was then a healthy stand of 43 for the sixth wicket between Kusal Perera and Dhananjaya de Silva (23) that looked set to get the Sri Lankans through to lunch.
A moment of madness from De Silva on what would be the final ball of the session, though, saw Rabada enter the fray as De Silva went on the hook only to find Olivier on the long leg boundary.