|LV= County Championship Division One, Taunton|
|Somerset 438 & 110: Cooper 26; Patel 7-38|
|Warwickshire 324 & 207: Bell 55; Cooper 5-76, Leach 4-74|
|Somerset beat Warwickshire by 17 runs|
|Somerset 24 pts, Warwickshire 6 pts|
Somerset's Jack Leach finished with 11 wickets in the match as he led his side to a 17-run win over Warwickshire.
The slow left-armer took 4-74 to go with his first innings' 7-106 as the Bears were bowled out for 207.
Part-time off-spinner Tom Cooper also claimed career-best figures of 5-76.
England's Ian Bell (55) was the only batsman to pass fifty for the visitors at Taunton as Warwickshire finished fifth in Division One and Somerset ended sixth, three points behind.
Somerset, who had already confirmed their survival on day two, looked on course for defeat with Warwickshire skipper Varun Chopra and Bell well set at 79-1 on the final morning.
But Cooper started the demise when he bowled Chopra for 33, and then removed Laurie Evans, Freddie Coleman and Tim Ambrose cheaply to leave the visitors on 89-5.
Bell chopped the Netherlands international onto his stumps to give him his maiden five-wicket haul.
Keith Barker made a spirited 46 off 41 balls and Jeetan Patel hit 27, but both were dismissed by Leach, who then removed Oliver Hannon-Dalby, caught by Cooper, to wrap up the victory.
The end of the match was marked by Alfonso Thomas, playing in his final game for Somerset, leading the team from the pitch.
Somerset captain Marcus Trescothick:
"We have had some big ups and downs during the course of the season, so finish to off like this was very pleasing.
"There have been some special things during the course of this game. The biggest was Alfonso Thomas playing his last game for the club and we wanted to send him off on a good note.
"We went into the game knowing what points we needed and were really switched on for two days. Once we got the points we needed to stay up we relaxed a bit and took our feet off the gas.
"Warwickshire made us pay. But we managed to switch back on today and get the result that we wanted.
Warwickshire director of cricket Dougie Brown:
"This is another game where we let the opposition get off to a start and we got behind the game.
"From a difficult position we fought back hard to turn the match on its head. It was a big toss for Somerset to win on a very dry surface, which did deteriorate as the game went on. That is not an excuse, it's a fact.
"Scoring 225 was always going to be a difficult today. We knew that Jack Leach was going to wheel away at one end and that Somerset had an off-spin option, but to get on the wrong end of that option was pretty frustrating."