Experienced Trego and Somerset’s young guns Craig Overton and George Dockrell each took three wickets as Lancashire were bowled out for 203 in pursuit of Somerset’s 420.
After the home side were made to follow on, Trego dismissed Alex Davies, Paul Horton and Ashwell Prince cheaply to reduce Lancashire to 95-3, trailing by 122.
Alex Hales bludgeoned his first Championship century in nearly two years for Nottinghamshire at Hove.
Hales blitzed 167 from 133 balls as Nottinghamshire took control, closing the third day with a commanding 404-run lead after declaring on 336-4 in their second innings.
Sussex’s Ed Joyce had turned an overnight 104 into an unbeaten 164 in his side’s first-innings total of 355 all out.
Middlesex’s Sam Robson stood firm as Durham search for their first championship win of the season.
Robson finished day three at Chester-le-Street on 42 not out with his side on 90-2 in their second innings and still trailing by 148 after following on.
In Division Two, Hampshire captain Jimmy Adams hit his second half-century of the match against bottom side Derbyshire at the Ageas Bowl.
Adams, having scored 60 on day one, made 67 to help Hampshire reach 214-5 declared, which set Derbyshire what looks a testing 346-run victory chase. By close of play, the visitors had made 31 without loss.
Geraint Jones rolled back the years with a brutal 93 for Gloucestershire, but Leicestershire hold a slender 21-run advantage going into the final day at Grace Road.
Jack Shantry took six wickets as Worcestershire forced Surrey to follow-on and take a 159-run lead into the final day at the Kia Oval.
Will Bragg helped edge Glamorgan into a 152-run lead over Essex at Chelmsford, where home bowler Reece Topley claimed his 10th wicket of the match.