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.
|Pedroia to return for Red Sox on Friday|
|Warriors´ Iguodala ruled out for game five against Rockets|
|Na leads as Spieth makes solid start at Colonial|
|James Harden, LeBron James headline 2017-18 All-NBA first team|
|Manchester United target Fred to decide future after World Cup|
|´Incredible´ Salah is like Messi, says Ronaldo|
|Salah a big candidate for Ballon d´Or - Muller|
|Message from coach keeping Masters champion Reed grounded|
|Anybody can really win it - Seles feels French Open is wide open this year|
|Mambo number 5! - Non-league star channels Lou Bega hit|
|Pakistan to stop wearing smart watches after ICC intervention - Hasan|
|Saha hails ´great man´ Ferguson as legendary Man Utd boss continues recovery|
|Emery´s depth of knowledge impressed Arsenal´s Gazidis|
|Conceicao extends Porto contract|
|Lomax impresses as Saints overrun Tigers|
|McIlroy in contention at Wentworth as Bjerregaard sets the early pace|
|Bad light calls time on Thiem, Wawrinka out in Geneva|
|Garitano in, Canales out at Real Sociedad|
|Caparros accepts new role at Sevilla|
|Pliskova downed by Larsson after drawing Serena in Paris|
|They´re using the anthem as fake patriotism - Warriors coach Kerr critical of NFL|
|Lyon win record fifth Women´s Champions League title|
|French Open 2018: Doing the unthinkable - the men most likely to topple Nadal|
|French Open 2018: How can Rafael Nadal be stopped?|
|Steve Smith named as marquee player for Global T20 Canada|
|Can Emre play? Yes he Can... and so can Milner|
|Liverpool working to help fans after flight cancellations|
|Abbas and Hasan torment sorry England|
|Xavi ´thrilled´ to sign two-year Al Sadd extension|
|Holtby extends Hamburg contract despite relegation|
|Nadal begins French Open defence against Dolgopolov|
|Serena drawn to play Pliskova in French Open first round|
|FA condemns assault of match official|
|Bologna confirm Donadoni departure|
|Yates lead halved in Giro d´Italia|
|Connacht turn to Friend|
|Scotland lose injured Dunbar for June tour|
|Spalletti in ´no rush´ to sign new Inter deal|
|Ricciardo and Red Bull dominate Monaco practice|
|Mauricio Pochettino signs new deal with Tottenham|
|Pochettino signs new deal with Tottenham|
|Istanbul to host 2020 Champions League final|
|Williams sisters given French Open wildcard|
|President Donald Trump praises NFL´s anthem stance|
|Buffon in consideration for Italy call, says Mancini|
|Roberts injured in Broncos win against Eels|
|Atletico complete move for Villarreal star Rodri|
|Ozil, Gundogan not playing politics, says Low|
|Valencia complete permanent Kondogbia signing|
|Fairytale ending could be in the script, says World Cup-bound Vardy|
|Milwaukee police apologise to Bucks´ Brown over tasering|
|Television, crosswords and Nintendo - Koscielny´s remedy to World Cup heartache|
|World Cup not an audition for Barca or Madrid, says Germany star Werner|
|Neck injury rules Kohli out of Surrey stint|
|Nine LaLiga titles and 674 club games under nine managers - Iniesta in Opta numbers|
|49ers Enterprises takes stake in Leeds United|
|Manchester United should sell Pogba if he´s unhappy - Scholes|
|Andres Iniesta´s nine LaLiga triumphs with Barcelona|
|Andres Iniesta: The footballers´ footballer|
|Real Madrid v Liverpool: Salah has foundations in place for Ballon d´Or challenge|
|Iniesta´s Vissel Kobe move confirmed|
|Low upbeat over Neuer´s World Cup hopes|
|´No secrets´ in playoffs, says Celtics rookie Tatum|
|Real Madrid v Liverpool: Salah takes his chances better than Ronaldo - Opta|
|Cubs, Yankees find very different ways to lose|
|Cole hoping to see Rooney in MLS amid DC United links|
|LeBron feeling worn down following Cavs loss|
|Rahm enjoys ´traditional golf courses´|
|Upbeat Spieth eyeing first win of 2018|
|Ovechkin leads Capitals into Stanley Cup Finals|