Jos Buttler contributed 68 as Somerset moved into the YB40 semi-finals by beating Gloucestershire by 12 runs at Bristol.
The hosts won the toss and opted to field but failed to find an early breakthrough - former England stars Marcus Trescothick and Craig Kieswetter putting on 105 for the opening wicket.
Craig Miles eventually removed the former for 50 and was soon on a hat-trick having sent Nick Compton back to the pavilion with a golden duck to his name - only for Buttler and James Hildreth (34) to seize the initiative.
Both men selected their shots carefully to take Somerset towards 200 and despite a trio of quick wickets for Tom Smith, Buttler carried his bat to help the visitors post 258-9 from their 40 overs.
Gloucestershire's reply began solidly as their top five batsmen all passed 30 - but the craft of Alfonso Thomas struck at crucial times as he removed Chris Dent (31) and Ian Cockbain (39).
Alex Gidman was another to begin promisingly as he moved smoothly to 41 only to have his stumps disrupted by Jamie Overton and with wickets falling at an alarming rate, Thomas' excellent variations at the death booked Somerset a last-four trip to face Nottinghamshire.