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.
|Criscito: I was on Genoa bridge shortly before collapse|
|Alonso to leave F1: How the Spaniard´s numbers stack up to the greats|
|Rookie LB Roquan Smith finally signs Bears contract|
|De Villiers enjoying relief from ´unbearable´ Proteas pressure|
|Fernando Alonso to leave F1|
|Spalletti extends Inter contract|
|Godin, Koke, Griezmann and Juanfran named Atletico Madrid captains|
|Ronaldo out of hospital after illness|
|Fury: Beating Wilder and Joshua ´very easy´|
|Dickinson retires to take up academy coaching role|
|Cricket the ´sole focus´ for Stokes as he returns to England squad|
|Cheryshev moves to Valencia on loan|
|Mandzukic retires from Croatia duty after World Cup|
|Ben Stokes found not guilty of affray|
|Tottenham issue new stadium update and apology to fans|
|Chelsea flop Bakayoko moves to AC Milan on loan|
|Gabi urges Al Sadd team-mate Xavi to play on|
|Ronaldo leads UEFA Goal of the Season nominees|
|Federer: Djokovic could be caught up in US Open pressure|
|Ronaldo to Juventus a huge boost for Serie A – Matthaus|
|Werner would welcome Ozil Germany return|
|´Perfectionist´ Serena admits to ´unrealistic´ expectations in tennis and motherhood|
|Klopp praises Deschamps and his ´boring´ France|
|LaLiga 2018-19: Bale or Griezmann - Who will step into Ronaldo´s breach as Messi´s main rival?|
|Woods winning 15th major would be greatest comeback in sport – Faldo|
|Retiring Storm great Hoffman not giving up on Finals dream|
|Folau won´t change aerial approach in All Blacks showdown|
|Racism behind Sterling criticism, says ex-Arsenal star Wright|
|Eto´o joins Qatar SC following Ligue 1 links|
|UEFA Super Cup 2018-19: Atletico academy eclipsing Madrid, La Masia|
|UEFA Super Cup 2018-19: Should Real Madrid cash in on Modric?|
|Scintillating Serena sends warning, Azarenka survives opener|
|DeGrom strikes out 12, Mets hit 5 homers in win over Yankees|
|Djokovic needs nine MPs as Murray crashes out|
|Murray unsure of US Open readiness after Cincinnati exit|
|Van Dijk: Alisson making difference at Liverpool|
|Johnson saves eight MPs but Djokovic prevails|
|Federer anxious ahead of Cincinnati comeback|
|Tevez relishing Messi reunion|
|Ronaldo arrival has taken Juve forward in Europe – Nedved|
|Serena steamrolls Gavrilova in Cincinnati return|
|Packers QB Rodgers doesn´t regret criticising team-mates|
|Indians OF Martin recovering from life-threatening bacterial infection|
|Shoulder injury sends Royals starter Duffy to DL|
|Yankees place Sabathia on DL with right knee inflammation|
|Aubameyang urges Emery to capitalise on his ´spark´ with Lacazette|
|Anderson can play until he´s 40, says Bayliss|
|Keita living childhood dream after securing Inter switch|
|49ers to sign veteran RB Alfred Morris, Kyle Shanahan says|
|Arnaiz leaves Barcelona for Leganes in €5m deal|
|Tottenham´s move to new stadium delayed|
|Roosters-bound Hall suffers ACL injury|
|Murray suffers Cincinnati defeat to Pouille|
|No Cech mate - Arsenal goalkeeper hits back at Bayer Leverkusen|
|Halep first to seal WTA Finals spot|
|Veteran Carmelo Anthony pens one-year Rockets deal|
|Runners and Ryders: Poulter closes in on Team Europe spot|
|Gameiro presented by Valencia after departing Atletico Madrid|
|World Cup winner Kimpembe extends PSG contract to 2023|
|AC Milan send Locatelli on loan to Sassuolo|
|South Africa´s Etzebeth set for return from injury|
|Rafinha ´very likely´ to stay at Barcelona|
|No dual Ryder Cup role should Woods make USA team, says Furyk|
|Inter complete Keita deal|
|David Silva announces retirement from international football|
|Modric in Real Madrid´s UEFA Super Cup squad amid Inter links|
|Neville hopes Shaw is on to something special after first United goal|
|Unchanged England waiting on Stokes verdict|
|Yates brothers to race Vuelta together|
|Kalinic explains why he rejected World Cup medal|