Keshav Maharaj produced his career-best figures as he curtailed Sri Lanka's early momentum on day one of the second Test in Colombo with a magnificent eight-wicket display.
The touring Proteas suffered a 278-run defeat in the first Test of the two-match series and appeared set for a trying day in the field on Friday as Sri Lanka delivered their first century opening stand since October 2016.
But Maharaj dislodged openers Danushka Gunathilaka (57) and Dimuth Karunaratne (53) and then proceeded to rip through Sri Lanka's middle-order in posting figures of 8-116.
His stunning show restricted Sri Lanka to 277-9, with Dhananjaya de Silva (60) the only other home batsman to make a meaningful contribution.
After being skittled for 126 and 73 in the first Test, South Africa will now look to take the final wicket quickly on Saturday and back up Maharaj's efforts with a batting performance that puts them in a position to draw the series.
The Maharaj show! South Africa's spinner takes a brilliant 8/116, his best ever Test figures, with Sri Lanka reduced to 277/9 on the opening day of the second Test in Colombo.#SLvSA scorecard https://t.co/P4Eg7K1Nw9 pic.twitter.com/wJb4CqPLZk— ICC (@ICC) July 20, 2018
Sri Lanka's decision to bat first appeared to be vindicated as Gunathilaka and Karunaratne put on 116 runs inside 35 overs.
But Karunaratne was removed when he was strangled down the leg side by Maharaj to be caught by wicketkeeper Quinton de Kock. Two overs later, and with just one run added, Gunathilaka top-edged Maharaj to Kagiso Rabada, who tore forward from deep square leg to take a terrific catch.
De Silva shared stands of 36 with Kusal Mendis (21) and 54 with Roshen Silva (22) but he otherwise found little in the way of partners as the middle order failed to cope with Maharaj's accurate and aggressive approach.
Rabada, the day's other wicket-taker, dismissed Silva with a yorker before Niroshan Dickwella edged Maharaj to first slip, giving the left-armer his fifth five-wicket haul in the longest format.
De Silva's resistance was ended by a successful Sri Lanka review after Maharaj trapped him lbw and, with Akila Dananjaya and Rangana Herath the last men at the crease for the hosts, Sri Lanka will at least take solace in that there should be plenty for their own spinners to exploit.
|Alexander-Arnold embodies Liverpool spirit - Klopp|
|Stoinis shoots Stars to Melbourne derby victory|
|A-League Review: Glory held in stalemate as Sydney close the gap|
|DeMarcus Cousins ´felt like a kid on Christmas´ in Warriors debut|
|Alexander-Arnold signs long-term contract at Liverpool|
|Pochettino eyes Messi-esque role for Alli|
|Halep sets up mouth-watering Serena showdown by conquering Venus|
|Wilder-Fury II expected for April 27 or May - Warren|
|Celtics´ Kyrie Irving on technical: If someone questions your manhood, you got no choice|
|Serena would ´love´ Halep clash|
|Djokovic sees off Shapovalov at Aus Open|
|DeMarcus Cousins scores 14 points in Warriors debut|
|´Don´t cry, you did really well´ - Serena consoles Yastremska|
|Andrade eyes Golovkin after defending middleweight title|
|WATCH: Cousins throws down thunderous dunk to open Warriors career|
|Serena sails into Australian Open last 16|
|Icardi will renew Inter contract - Nara|
|Mickelson maintains Desert Classic lead|
|Klopp dismisses Coutinho rumours|
|Osaka completes stunning comeback in Melbourne|
|Lakers guard Rondo cleared for full-contact practices|
|Solskjaer: Lukaku is big part of Man United squad|
|Napoli slam FIGC decision to reject Koulibaly appeal|
|We´re the hunters! - Kovac´s Bayern ready to chase down Dortmund|
|Chiefs safety Reid expected to play against Patriots|
|Chelsea not ready to rest Jorginho - Sarri|
|NFL receiver Fitzgerald has hole-in-one in round of golf with former president Obama|
|I´m really loving playing this game - Eagles QB Foles not ready to retire|
|Saints show no mercy, score 111 in rout of Timisoara Saracens|
|CAF Champions League Review: Khenissi double gets ES Tunis up and running|
|Edinburgh clinch home quarter-final, Glasgow also advance to last eight|
|Hazlewood to miss Sri Lanka Tests with back injury|
|Norwich City 3 Birmingham City 1: Canaries end winless run to go second|
|Hoffenheim 1 Bayern Munich 3: Goretzka goals close gap on Bundesliga´s return|
|Cowboys part ways with offensive coordinator Linehan|
|Payton´s message to Saints fans: Hurry up and make noise|
|Transfer talk no distraction for Inter, says Spalletti|
|Memories of 2015 still linger for Vunipola as England begin World Cup year|
|De Bruin´s 85th-minute try consigns Kings to eighth straight loss|
|Bielsa´s Derby County dossier detail ´pretty standard´ – OptaPro chief|
|Injury-hit Madrid lose Navas to adductor issue|
|Patriots coach Belichick still gets nervous ´every week´|
|Copa del Rey draw: Barcelona to meet Sevilla in quarter-finals|
|Kohli: No one more committed to India than Dhoni|
|Brook questions Khan credibility following Crawford agreement|
|Sad Pochettino admits Bielsa is ´wrong´|
|Simeone eyes LaLiga gain after Atletico´s Copa del Rey pain|
|Rossi a no-go for Tottenham as Pochettino rules out panic buys|
|Guardiola identifies ´three or four´ midfield targets|
|Nadal encourages patience in young stars after humbling De Minaur|
|NFL playoffs 2019: 10 Opta facts for Patriots v Chiefs|
|Robertson helping Klopp learn Scottish for Dalglish chats|
|Levante appeal over alleged ineligible Barcelona player rejected|
|NFL Playoffs 2019: 10 Opta facts for Rams v Saints|
|Lowry to take three-shot Abu Dhabi lead into final round|
|Training is not for anyone else - Klopp condemns Bielsa over ´spygate´ row|
|In other countries, everybody does it - Guardiola respect remains for spying Bielsa|
|Cilic battles back to join Nadal, Federer in fourth round|
|Klopp: Trent unbelievable for playing through pain|
|Faulkner provides super start and fabulous finish to sink Scorchers|
|Ref admits error in key foul call on Lonzo Ball in Lakers-Thunder game|
|Marina Granovskaia is working very hard – Sarri ´confident´ of January signings|
|Tuchel confirms Rabiot out of PSG contention|
|Madrid derby kick-off confirmed for February 9|
|Benzema fit to face Sevilla despite broken finger, Solari confirms|
|Bournemouth boss Howe says no offers received for Wilson|
|Kerber cruises after Wozniacki, Sabalenka upsets|
|Mbappe a great player and great person, says beaming Beckham|
|Gracia confident someone will step up if Doucoure leaves for PSG|
|Albrighton signs new Leicester deal|