Cape Town - Thando Ntini's triple strike put South Africa Emerging on top before their Sri Lanka counterparts hit back to reach the halfway mark of their decisive four-day clash in a fighting position in Pretoria on Friday.
The fast bowler claimed three for 33 and was well supported by Marco Jansen, who took two for 37, as the tourists were restricted to 217 for five at the close - replying to a strong first-innings total of 441 all out by the hosts.
It meant that the South Africans still held a substantial 224-run lead heading into day three.
Shukri Conrad's charges, who lead the two-game series 1-0, also had their batsmen to thank for propelling them close to the 450 mark earlier in the day, though Lasith Embuldeniya claimed a career-best eight for 156 in 42 overs of left-arm spin.
Captain Raynard van Tonder extended his unbeaten 122 overnight at the start to finish on an excellent 137 (267 balls, 14 fours, 1 six).
Sinethemba Qeshile, the other overnight man, missed out on a century but still scored an impressive 87 off 89 balls (9 fours, 2 sixes).
But the star man with the bat on day two was Kyle Simmonds after he powered a swashbuckling 73 off 57 balls, which included three sixes and eight fours.
The all-rounder also shared in a ninth-wicket stand of 58 with Jansen that gave the home side all the momentum heading into the Sri Lanka innings.
Jansen then struck early by getting rid of Lahiru Igalagamage for eight, before a 75-run stand between Pathum Nissanka (32) and top-scorer Minod Bhanuka (56 off 65 balls, 8 fours, 1 six) got the Asians back on track.
But Ntini struck thrice either side of the 100 to tip the scales heavily in favour of South Africa - the tourists suddenly dropping to 128 for four.
An 89-run fifth-wicket partnership between Promod Maduwantha (47 not out) and Jehan Daniel (36) inspired a strong fightback, before Jansen broke the stand to leave the hosts well-placed at the close.
SA Emerging squad:
Tony de Zorzi (Titans), Janneman Malan (Cape Cobras), Raynard van Tonder (Knights), Matthew Breetzke (Warriors), Wandile Makwetu (Knights), Sinethemba Qeshile (Warriors), Sibonelo Makhanya (Dolphins), Marco Jansen (Knights), Tshepang Dithole (Highveld Lions), Tshepo Ndwandwa (Cape Cobras), Tladi Bokako (Cape Cobras), Nandre Burger (Cape Cobras), Kyle Simmonds (Northerns), Jason Smith (Cape Cobras), Dayyaan Galiem (Titans), Thando Ntini (Cape Cobras)