Somerset 236 (Byrom 56, Patel 7-81) and 250 for 9 dec (Hildreth 109, Patel 5-92) beat Middlesex 142 (Leach 4-54, C Overton 3-7) and 113 (Leach 5-57, van der Merwe 4-22)
Jack Leach went past 50 Specsavers County Championship wickets for the season as Somerset achieved First Division survival with a comprehensive 231-run win over Middlesex at Taunton.
The result left the visitors anxiously eyeing events at Edgbaston where only a Hampshire defeat would save them from Second Division cricket next season.
Leach finished with five for 57 as Middlesex were bowled out for 113 on the final day, from an overnight 40 for three, chasing a highly improbable 345 for victory.
Roelof van der Merwe weighed in with four for 22 and Somerset took 20 points to leapfrog Middlesex, who claimed just three, in the First Division table.
Stevie Eskinazi was first to go. Having made 16, he pushed forward to van der Merwe and edged to the kneeling Marcus Trescothick at second slip.
The 41-year-old former England opener has adopted that position in recent games to protect his back and was not praying for the victory that would keep his hopes of winning a Championship title with his beloved county alive.
The score had moved to 71 when Adam Voges played forward to Leach and edged a comfortable catch to Craig Overton at first slip.
The left-arm spinner, considered by many unlucky not to have made the Ashes squad, brought up his 50 wickets when John Simpson, who had looked to counter-attack with 2 fours and six, fell leg-before for 19.
On a pitch that has turned throughout, van der Merwe proved an excellent selection by Somerset as third spinner. He had Paul Stirling snapped up by Overton at slip to make the score 80 for seven.
The South African all-rounder quickly followed up as James Harris top-edged a sweep and departed for 13. At 93 for eight, home supporters prepared to celebrate.
Tim Murtagh lofted a six over mid-wicket off van der Merwe before being bowled in the same over.
And when Leach had an lbw appeal against Steven Finn upheld by umpire Mike Burns it sparked wild celebrations from a Somerset team, who looked doomed to the drop before winning three of their last four matches.
It was a satisfying end to his time as Somerset director of cricket for Matthew Maynard, the club having announced last night that he is leaving. The club intend to appoint a replacement and a new head coach in the near future.
Word is that the pitch will be marked no worse than below average. And as Somerset have not had any other wicket deemed in that category over the past 12 months, there should be no question of any docked points.
Source: ESPN Crickinfo