Somerset 95 (Barker 4-33) and 211 (Rogers 58, Patel 5-86) beat Warwickshire 123 (Westwood 34, Bess 6-28) and 152 (Clarke 55*, Wright 45, Leach 6-42) by 31 runs
Jack Leach finished with 6 for 42 as Somerset completed a 31-run Specsavers County Championship victory over Warwickshire on the third morning at Taunton.
Resuming on 131 for 8, needing a further 53 to win, the visitors battled for 14 overs before being bowled out for 152, Rikki Clarke ending unbeaten on 55.
Lewis Gregory was the other wicket-taker as Somerset took 19 points to keep alive their hopes of a maiden Championship title. Warwickshire had to be content with three points and are not yet out of relegation danger with only one game remaining.
The first half hour saw Clarke and Chris Wright carefully build on their ninth-wicket stand against the spin of Leach and Roelof van der Merwe.
Clarke reached his half-century off 138 balls, with eight fours and a six, and the pair had reduced the deficit to 37, with the stand worth 86, when an inspired piece of captaincy by Chris Rogers brought the breakthrough.
He introduced Gregory from the River End and, with his fourth delivery, the seamer had Wright caught behind for 45.
"I brought Lewis on because I felt the batsmen were getting into a rhythm against our spinners," Rogers said. "I just had a bit of a feeling that a change of pace might cause problems.
"Such decisions often come down to luck and it's nice when they go your way. It makes you look like you know what you are doing!
When Clarke took a single off Leach's third ball of the 58th over, Somerset moved in for the kill, surrounding last man Josh Poysden with close fielders.
The tail-ender got an inside edge and Marcus Trescothick ended the game with the 394th first class catch of his Somerset career, at leg-gully, breaking a club record set by Jack White, whose career ended in 1937.
The wicket sparked jubilant celebrations on the pitch and the home side could celebrate an unlikely win after being bowled out for 95 on the first morning.
"It wasn't the sort of pitch I would want to spend my career batting on," Rogers added. "Each ball behaved a bit differently and that creates questions in the minds of batsmen, which makes them tentative.
"But our spinners are bowling well and I'd take the same sort of wicket in our final home game against Notts if it means winning the title!"
However, Warwickshire's captain, Ian Bell, was more critical of the surface that Somerset had laid on.
"The pitch wasn't dangerous in any way so there was no cause for complaint," he said. "The ECB want wickets that turn, but I don't think that sort of surface is great even for the development of spinners.
"It may bring them more wickets, but they will then find themselves bowling on slow low tracks if they step up to international level."
As for Warwickshire's prospects for the final throes of the season, Bell added: "It's disappointing because we are now right in the mix at the wrong end of the table. The game summed up our Championship cricket this season because we were good in spells, but not consistent enough.
"We have a big final at Lord's to look forward to so we can't afford to dwell on this defeat. But whatever happens we need to look at our four-day cricket because there have been problems stretching back to the end of last season."