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.
|Warnock enjoyed ´poetic justice´ of Kenedy´s penalty woe|
|Holders Eintracht Frankfurt stunned by Ulm in DFB-Pokal|
|West Ham 1 Bournemouth 2: Wilson, Cook condemn Hammers to successive losses|
|Tottenham 3 Fulham 1: Trippier and Kane help Spurs avoid Wembley wobble|
|Leicester City 2 Wolves 0: Lucky Foxes win despite Vardy red card|
|Everton 2 Southampton 1: Richarlison continues fine start|
|Drochtersen/Assel 0 Bayern Munich 1: Lewandowski spares Bayern´s blushes|
|Violent hack, no passes, missed penalty - Kenedy´s Cardiff nightmare|
|Ronaldo handed Juventus debut against Chievo|
|Cheika and Hooper frustrated by second-half slump|
|Hansen issues warning after All Blacks win Wallabies ´prizefight´|
|Stuttgart stay good for Pavard, says Reschke|
|You can´t buy class - United boss Mourinho blasts City documentary|
|Cardiff City 0 Newcastle United 0: Penalty miss rounds off abject day for Kenedy|
|Lopetegui open to rotating Real Madrid goalkeepers|
|´World´s best´ Alisson will be difficult to replace, says Roma boss Di Francesco|
|Dragons and Sharks pounce on Panthers after four get sin-binned|
|AC Milan situation has proved FFP works - UEFA president Ceferin|
|Marseille´s Garcia uninterested in striker despite Balotelli link|
|Goodhue sparkles on debut as All Blacks thump Wallabies|
|I feel like chicken tonight - Saunders game for a laugh after Wilder fowl play|
|Aubameyang-Lacazette partnership possible for Arsenal|
|Pant handed debut as India ring changes at Trent Bridge|
|Pochettino pledges to protect Kane|
|Federer relieved to ´hang tough´ in Cincinnati|
|De Bruyne injury: Can Foden or Diaz replace Man City playmaker?|
|Furyk confident as Team USA takes shape|
|Neymar´s behaviour deserves praise, Tite claims|
|Scherzer, Harper lead Nationals past Marlins|
|Djokovic and Federer join Cilic, Goffin in Cincinnati semis|
|Federer outlasts recovering Wawrinka|
|WATCH: Djokovic wins match, loses car|
|Bolt arrives in Sydney for A-League trial|
|Red-hot Bertens beats Svitolina, Halep marches on|
|Snedeker preserves Wyndham lead|
|Halep hits back to torment Tsurenko|
|Raonic fails to break Djokovic stranglehold|
|Emery seeks more ´demanding´ Ozil|
|CAF Champions League Review: Wydad, Al Ahly & TP Mazembe qualify|
|Stephen Curry wants to finish his career with Warriors|
|Hazard among Europe´s best but can improve, says Sarri|
|Tigers boost top-two hopes, Giants close in on fourth|
|Birmingham City 0 Swansea City 0: Monk´s men held despite dominance|
|Inter taking legal action against Tebas over Modric transfer comments|
|Serie A transfer round-up: Zaza joins Torino, Parma sign Gervinho|
|Roma chief Pallotta makes light of De Laurentiis claim|
|Federer starts double-header by seeing off resilient Mayer|
|Ospina joins Napoli on loan from Arsenal|
|Klavan completes Cagliari switch|
|Djokovic holds out against Dimitrov as Raonic awaits|
|New dates confirmed for postponed Serie A fixtures|
|Halep breezes past Barty to set up Tsurenko clash on same day|
|Olesen unable to capitalise on strong start as Jamieson, Waring go clear|
|Hoffenheim tie Kramaric to four-year deal|
|Mina to miss Southampton clash while Gomes is ´weeks´ away|
|Barcelona coach Valverde dismisses Pogba speculation|
|Valverde not prioritising Champions League over defending Barcelona´s LaLiga title|
|Allegri thanks outgoing Juventus icon Marchisio|
|Pants display from Beef? Johnston forced into change of trousers in Sweden|
|Tour champion Thomas has Welsh velodrome named in his honour|
|Gloucester surprised and disappointed by RFU´s swift Cipriani charge|
|Storm skipper Smith´s back injury not ´too serious´|
|Spurs fixture switch doesn´t appeal to Guardiola|
|Brazil call up Andreas Pereira & Arthur but omit Man City stars|
|Mbappe returns to PSG squad, Kehrer set for debut|
|No Messi in Argentina squad as Simeone wins first call-up|
|England man Roy embarrassed by self-inflicted facial injury|
|Atletico Madrid fined for breaching third-party regulations|
|Cipriani charged by RFU after common assault conviction|
|No contact, no negotiation - Leonardo denies AC Milan deal for Milinkovic-Savic|