Lancashire looked doomed after the other side threatened with the drop, Surrey, pulled off a 195-run triumph over third-placed Nottinghamshire across London at the Kia Oval.
Notts began the day needing 347 for victory with all second-innings wickets in hand but collapsed to 151 all out as Surrey captain Gareth Batty took four for 30.
The visitors made a steady start, reaching 54 for one, but the introduction of spin proved their undoing with Kevin Pietersen also claiming two for 24.
Somerset are now well-placed to finish runners-up to champions Warwickshire after leaping up the table with an impressive five-wicket success over Sussex at Hove.
James Hildreth hit an unbeaten 101 and Peter Trego an explosive 89 not out in an unbroken stand of 168 as Somerset, who lost just one wicket all day, powered to victory at 397 for five. Alex Barrow (40) was the man to fall as Somerset completed the second-highest successful run chase in their history.