Pathum Nissanka spearheaded Sri Lanka's chase as they closed out day two of their second Test against South Africa in a strong position.

Nissanka scored 89 from 157 deliveries, with that knock including 11 fours and one six, before he was bowled by Keshav Maharaj (1-46).

South Africa's Kyle Verreynne played a starring role with the bat for the hosts earlier on in Friday's play at St George's Park, plundering 58 from just 50 balls for an unbeaten 105.

Verreynne's efforts saw South Africa reach 358 before they were bowled out, but Nissanka and his fellow opener Dimuth Karunaratne made good in-roads before the latter was dismissed by Kagiso Rabada (1-40) in the 16th over.

Proteas wicketkeeper Verreynne took the catch, and he followed that up by sending Dinesh Chandimal (44) packing from a Dane Paterson delivery, but by that stage Sri Lanka had progressed to 150.

They had reached 199 by the time Maharaj got the crucial wicket of Nissanka, who was dropped early in his innings, 11 overs later, though the damage had been largely done, with Angelo Mathews (40 not out) and Kamindu Mendis (30) further chipping away at South Africa's lead before stumps, which the hosts reached on 242-3.

Data Debrief: Verreynne drags South Africa out of trouble

Matters looked bleak at the start of play for the Proteas, who were on 269-7, and they had owed many of those runs to Ryan Rickelton, who scored 101 on day one.

Yet Verreynne anchored their innings and dragged them to a respectable total, tallying up his third Test ton in the process in his 22nd match in the longest format.

He clubbed 12 fours and three maximums, with his total coming from a 78.94 strike rate.

But with Verreynne and Rickelton combining for 206 of South Africa's 358 runs, while Temba Bavuma contributed 78, the rest of the Proteas batters must step up in their second innings.