The South Africa Test bowler took the last six wickets in the visitors' first innings of 196 all out to extend his tally to seven for 52, and then claimed two more to reduce Somerset to 159 for four after they had been asked to follow on.
Somerset will go into day four needing a further 165 runs simply to make Yorkshire bat again.
Essex are poised to leapfrog the leaders after former England captain Alastair Cook added 83 second innings runs to the 84 he scored in the first to leave Warwickshire with a mountain to climb at Chelmsford.
Cook's contribution and 74 from Dan Lawrence helped the home side to 316 for nine declared, in the process setting the visitors a target of 401 to win, which they had reduced by 67 for the loss of opener Will Rhodes by the close.
The visitors amassed 555 before they were all out and then claimed the wickets of Felix Organ and Ajinkya Rahane to reduce the home side to 119 for two by stumps, still 27 runs behind heading into the final day.
Twenty-year-old off-spinner Amar Virdi bowled Surrey to a 167-run victory over Nottinghamshire at Trent Bridge as he took his match tally to 14 wickets.
Virdi, who claimed eight for 61 in the first innings, helped himself to six for 78 in the second to help skittle the home side out for just 181 after they had been set a target of 349 for victory.
Delray Rawlins' maiden first-class century could not prevent Sussex from slipping to an innings defeat by Division Two leaders Lancashire.
Rawlins and David Wiese put on 128 for the sixth wicket, but his departure for 100 helped to ease the home side to victory by an innings and 51 runs with Sussex all out for 316.
Matt Parkinson took four for 142 to complete career-best match figures of 10 for 165.
Sam Robson batted Middlesex into a commanding position against Glamorgan with an unbeaten 140 at Cardiff.
Robson's efforts left the home side chasing an improbable 556, and they had slipped to 171 for six by the close.
Northamptonshire's trip to Derbyshire is set for a tense conclusion with the home side needing another 164 runs to win with five second innings wickets remaining at Chesterfield.
Fynn Hudson-Prentice scored 55 as the home side were bowled out for just 146 in their first innings, and although Northants managed only 122 in their second innings with Tony Palladino taking four for 33, Derbyshire were 155 for five overnight needing a further 163 to win.
Chris Rushworth took three wickets for just four runs in a late blitz as Durham piled the pressure on Worcestershire at Chester-le-Street.
Jack Burnham had batted the home side into a strong position with 76 as they set Worcestershire 352 to win before Rushworth accounted for Daryl Mitchell, Riki Wessels and Joshua Dell to reduce the visitors to 31 for three.
Elsewhere, Neil Dexter led the way with 56 as bottom-of-the-table Leicestershire were bowled out for 252 on the opening day of their clash with Gloucestershire at Cheltenham, with Ethan Bamber and Matt Taylor taking three wickets apiece.