At tea, England were 184 for six in reply to South Africa's first innings 335 -- still a deficit of 151 runs.
Moeen Ali was 14 not out and Liam Dawson two not after Root, in his second match as England captain, had fallen for a fine 78 on a day when batsmen on both sides struggled in the overcast conditions.
But after Morne Morkel removed Root, left-arm spinner Keshav Maharaj took two wickets for five runs in 11 balls, with Stokes out for a 12-ball duck and dangerman Jonny Bairstow falling for 45.
South Africa, 309 for six overnight, lost their last four wickets for 26 runs in 6.2 overs.
James Anderson, England's all-time leading Test wicket- taker, did the damage with a burst of four wickets for four runs in 16 balls.
But England then slumped to three for two in reply.
Former skipper Alastair Cook was caught behind for three when he got an inside edge to Vernon Philander's inswinger, although South Africa had to review Australian umpire Simon Fry's not out decision.
Next ball, Cook's fellow left-handed opener Keaton Jennings fell for a duck.
The South Africa-born batsman was undone by a brilliant Morkel delivery from around the wicket that cut away off the pitch and took an edge safely held by wicket-keeper Quinton de Kock -- who played in the same Johannesburg school side as Jennings.
- Root counter-attacks -
Root, who made 190 in his first innings as England captain at Lord's, counter-attacked by hitting Philander for three fours in an over.
And at lunch he and Yorkshire team-mate Gary Ballance, desperate to nail down his Test place after being recalled at Lord's, had taken England to 85 for two.
Ballance, however, had added just one to his lunch score of 26 not out when the left-hander played on to Philander.
The towering Morkel then had Root edging an intended drive and de Kock, diving in front of first slip, held an excellent catch.
It was the end of Root's impressive 76-ball innings, featuring 12 fours, with England now 143 for four.
De Kock was involved again when holding a juggling catch after Stokes inside-edged Maharaj onto this pad.
It took an age for Stokes to finally be given out as the umpires checked to see if the ball had made any contact with de Kock's helmet -- which would have seen the wicket chalked off.
Ali got off the mark first ball with a slog-sweep four off Maharaj.
But Maharaj bowled Bairstow with a ball that drifted in and then turned to hit off stump -- a classic left-arm spinner's wicket.
Before play started on Saturday, England persuaded the umpires to change what they believed to be an out of shape ball, with the floodlights already switched on.
It was a move that paid dividends just five balls into the day's play when, without another run added, Philander fell for his overnight 54, caught in the covers from a leading edge off Anderson.
Trent Bridge is renowned for aiding swing bowlers such as the 34-year-old Anderson, whose overall return of five for 72 in 23.2 overs was the 22nd time he'd taken five or more wickets in a Test innings and his seventh such haul at the Nottingham ground.
(This story has not been edited by Business Standard staff and is auto-generated from a syndicated feed.)