Debutant Lungi Ngidi claimed two late wickets on a costly day for India captain Virat Kohli, as South Africa closed in on a series victory in the second Test at Centurion.
India were set 287 to win after bowling the Proteas out for 258 on day four, Mohammed Shami (4-49) the pick of the bowlers but a stand of 141 from AB de Villiers (80) and Dean Elgar (61) put the Proteas in command.
Captain Faf du Plessis also weighed in with a patient 48 on a surface offering variable bounce, before Ngidi (2-14) and Kasigo Rabada (1-9) reduced the tourists to 35-3 at stumps - 252 runs short of their target.
Ngidi claimed the huge wicket of Kohli, who was earlier fined 25 per cent of his match fee for poor on-field behaviour on day three and looks set to preside over the top-ranked side's first Test series loss for three years.
De Villiers and Elgar had rescued South Africa from 3-2 to 90-2 on Monday and continued to frustrate India in the morning session, the latter not looking comfortable but gaining his reward for digging in when he drove Ishant Sharma to the extra-cover boundary to reach 50.
The brilliant De Villiers deserved a hundred, but the partnership finally ended when the former skipper gloved a rising Shami delivery through to Parthiv Patel and Elgar soon followed, pulling the same bowler to KL Rahul at deep square-leg.
South Africa were 163-5 - leading by 191 - when a pumped-up Shami removed Quinton de Kock (12), but Du Plessis grafted it out after Rahul put down a difficult chance to remove him and Vernon Philander (26) provided support before Ishant (2-40) sent him on his way.
Rabada hung around following Keshav Maharaj's early dismissal but fell before Du Plessis, who struck only four boundaries, was caught and bowled by Jasprit Bumrah (3-70) soon after the paceman gave him another life.
India found themselves deep in the mire after a first wicket for Ravichandran Ashwin (1-78) ended South Africa's second innings, Murali Vijay the first to go, chopping on to a Rabada delivery which kept low.
Ngidi then took centre stage with a hostile spell of fast bowling, although Rahul gifted the 21-year-old his first wicket, tamely steering a short and wide delivery to Maharaj at point.
The Durban-born new boy then claimed the prized scalp of Kohli, the first-innings centurion falling for only five after playing across the line to a delivery which angled in and unsuccessfully reviewed an lbw decision.
Parthiv (five not out) took a nasty blow in the ribs from a hostile short ball from Ngidi, but the wicketkeeper and Cheteshwar Pujara (11no) were still there at the close.
|Zidane stands by selfless Benzema|
|Sodhi earns New Zealand ODI recall|
|´Important names´ keen on Inter star Icardi|
|Hughes returns in only England change|
|Manchester United v Chelsea: Mourinho and Conte´s feud in their own words|
|Manchester United v Chelsea: Grant´s disastrous debut, Drogba´s ´offside´ goal and other Old Traffor|
|Walker motivated by EFL Cup final showdown with Arsenal|
|Manchester United v Chelsea: ´Specialist in failure´, eye-pokes and Mourinho´s other best rows|
|CONCACAF Champions League Review: America close in on quarters with huge win|
|Keane defends Pogba as former United captain demands more from Lukaku and Sanchez|
|Stoger labels Reus ´indispensable´ amid Milan links|
|Ferdinand and Man United team-mates doubted De Gea|
|Sock, Isner and Raonic crash out at Delray Beach|
|Rain sees Cilic-Monfils suspended at crucial stage|
|Djokovic steps up rehab as Federer leads the way|
|Cuban fined $600K for tanking comments|
|Fowler says PGA National demands full attention|
|Rory McIlroy curbing expectations before Masters|
|Shakhtar would´ve won by more if not for Roma´s Alisson – Fonseca|
|Popovich would be ´surprised´ if Leonard returns for Spurs this season|
|Championship Review: Wolves squander two-goal lead to Norwich, Cardiff City take advantage|
|Mourinho happy with ´big effort´ from Pogba|
|Benneteau ousts Bautista Agut in Marseille|
|Mourinho questions medical staff after ´bad´ Herrera injury|
|Sarri demands better from Napoli ´buffoons´|
|Mourinho hugs reporter for asking about McTominay instead of Pogba|
|Di Francesco slams Roma: I should have substituted half of them!|
|Curtains for Konta and Ostapenko in Dubai|
|De Gea happy with ´important´ wonder save|
|Woods eager to experience Masters ´rush´|
|Vazquez and Asensio important to Madrid, says Zidane|
|Shakhtar Donetsk 2 Roma 1: Fred stunner seals first-leg comeback|
|Sevilla 0 Manchester United 0: De Gea ensures Mourinho´s men stay level|
|Klaasen and Duminy half-centuries set up T20 decider|
|Herrera injury gives dropped Pogba chance for reprieve|
|Tindall urges England to ´hunt´ vulnerable Scotland|
|Firmino insists he did not abuse Holgate|
|Leganes 1 Real Madrid 3: Casemiro inspires comeback for Zidane´s men|
|Milan have everything to lose – Gattuso worried about complacency|
|United a big team in defeat - Mourinho aims dig at City|
|Firmino escapes punishment after Holgate allegation|
|Mourinho benches Pogba for Sevilla clash|
|Cavendish withdraws after Abu Dhabi crash|
|Rugby greats put on show in French Alps snow|
|Gremio refute claims of €40m Arthur agreement with Barcelona|
|Messi will sign another Barcelona contract, predicts Bartomeu|
|UEFA rejects PSG appeal over Rabiot´s Real Madrid booking|
|Hardaker sacked by Tigers after failed drugs test|
|James to miss ´a few days´ of Bayern training with calf injury|
|Bellew not feeling Haye love|
|Nantes not stopping Ranieri if Italy come calling|
|Milan owner Li slams ´fake news´ over financial woes|
|Italy make three changes for France encounter|
|Wenger still gunning for top four spot with Arsenal|
|AFC Champions League Review: Kanazaki braces inspires Kashima|
|Gloucester centre Scott to re-join Edinburgh|
|Ospina to get Wembley nod as Wenger waits on Ramsey|
|Pogba not struggling at United, claims Deschamps|
|No police action against Gloucester coach Ackermann or son after nightclub incident|
|Australia proved a point with tri-series dominance, says Warner|
|Escape Messi´s shadow? Change sport! - Henry´s advice to Neymar|
|Scotland unchanged for crucial Calcutta Cup clash|
|Horsing around: Muller takes tips from equine companion|
|Lynn set for further assessment on dislocated shoulder|
|Ronaldo jets off for a break as Madrid head to Leganes|
|Bastareaud back in one of five France changes|
|Mistake to let Kroos leave Bayern for Madrid - Sammer|
|Short´s fifty and Agar´s spin seal deserved Australian tri-series win|
|Spalletti tips Ancelotti for Italy job|
|I can´t wait for retirement - Federer|