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.
|Lopetegui defiant amid Real Madrid sack reports|
|Sri Lanka spinner Herath to retire after Galle Test|
|Ronaldo returns for Old Trafford welcome amid disquieting noise|
|Garcia claims third Andalucia Valderrama Masters title|
|Ex-England international Waldrom retires|
|´Massive personality´ Hart can lift Burnley, says Kompany|
|Liverpool felt wrath of ´emotional´ Klopp, says Shaqiri|
|Reid: Jenkins capitalised on Kaepernick movement|
|Manchester United v Juventus: Ronaldo out to end dismal scoring record against Mourinho|
|Injured Ribery to miss Bayern´s clash with AEK|
|Wilshere would have stayed at Arsenal under Wenger|
|Mahomes stars again as Chiefs crush Bengals|
|Bolt must accept ´much less´ to join Mariners, says A-League chief|
|Klopp compares Liverpool to dog without favourite toy|
|Young leads Hawks to first win, Thunder fall in Westbrook´s return|
|Spalletti hits out at physical Milan – I had three players asking to be replaced|
|Cowboys, Ravens lose after missed kicks in final seconds|
|Hernangomez secures Nuggets´ win over Warriors with last-second block|
|Hasler returns to Manly on three-year deal|
|Sarri: Chelsea fans must respect Mourinho|
|Ronaldo learnt from Scholes – Pjanic praises Juventus star|
|CA dismisses spot-fixing claims|
|WATCH: Will Ferrell leads chants with LAFC fans|
|MLS Review: Galaxy on track for play-offs as Timbers, DC clinch spots|
|Elliott secures win at Hollywood Casino 400|
|Thunder´s Westbrook makes season debut against Kings|
|Saints beat Ravens after Tucker misses extra point|
|Rondo, Paul and Ingram banned after Lakers-Rockets fight|
|Saints QB Brees reaches another historic milestone|
|Biglia: VAR should have checked Nainggolan tackle|
|Gattuso not blaming Donnarumma for derby defeat|
|Seventh in Mexico will secure Hamilton´s fifth world title|
|Rooney fires DC United into MLS play-offs|
|Alonso slams ´amateur´ F1 rivals after latest crash|
|Spalletti fears lengthy Nainggolan absence|
|To the Max! Verstappen destroyed shoe fending off Hamilton|
|Icardi delight after Donnarumma error gives him another derby winner for Inter|
|Guardiola: Versatility the key for Stones|
|Vettel frustrated as mistakes continue to hamper title challenge|
|ECB refutes spot-fixing claims against England players|
|I thought we would do better - Hamilton queries Mercedes strategy|
|Inter 1 AC Milan 0: Icardi settles derby with dramatic late winner|
|Hamilton denied title party as Raikkonen wins in Austin|
|Patriots RB Michel out against Bears with gruesome knee injury|
|Kohli hails Rohit partnership after comprehensive India victory|
|Silva downplays his role after Everton super subs seal victory|
|Injured Bairstow out of final white-ball matches in Sri Lanka|
|Pliskova feeling confident after impressive start in Singapore|
|Big-hitting Imrul rescues Bangladesh in opening ODI|
|Leinster suffer late defeat at Toulouse, Newcastle snatch dramatic victory|
|Chargers pip Titans to dramatic London win|
|Everton 2 Crystal Palace 0: Substitutes Calvert-Lewin and Tosun clip Eagles´ wings|
|Thunderstorms push Andalucia Valderrama Masters into reserve day|
|Edmund masters Monfils to claim maiden singles title|
|Kohli and Rohit fire India to comprehensive ODI win|
|Manchester United didn´t play - David Luiz blasts Mourinho tactics|
|Svitolina out to silence ´haters´ in Singapore|
|Emre Can facing surgery on thyroid problem|
|Tsitsipas claims maiden ATP crown in Stockholm|
|Mariners boss Mulvey knows nothing of Bolt contract offer|
|WATCH: Vinicius Junior scores free-kick - then sees red!|
|Gronkowski ruled out of Bears clash|
|Khachanov enjoys home comforts with comprehensive Kremlin Cup win|
|Isner wants Wimbledon tie-break rule named after him|
|Hummels lauds ´outstanding´ Lewandowski|
|Liverpool´s defensive improvement no accident – Gomez|
|Pliskova overpowers defending champion Wozniacki in Singapore|
|Marquez dislocates shoulder celebrating MotoGP title|
|Henry taking positives from opening Monaco defeat|
|A-League Review: Mariners held as Bolt considers move|