Last man Simon Jones struck a four in the final over to seal a dramatic Yorkshire Bank 40 victory for Glamorgan over Group C leaders Somerset that put the Welsh County, one of three teams two points behind, second with a two games in hand.
Former England bowler Jones was the hero after Glamorgan made a meal of what looked like being a simple victory charge at the SWALEC Stadium.
The hosts were well set on 195 for four in the 33rd over, chasing 223 to win.
Yet the loss of captain Marcus North sparked a collapse that saw five wickets fall in the space of 25 balls. In the end, Jones’ solitary boundary secured a one-wicket win with three deliveries unused.
Wicketkeeper Mark Wallace cracked 70 from 57 deliveries and Chris Cooke added 44 to lay the foundations for Glamorgan’s chase.
Earlier, seamer Michael Hogan returned 4-34 to help limit Somerset to 222 for eight, although that represented a useful recovery.
After being inserted, Somerset initially slipped to 64 for four and were grateful for a stand of 116 between England internationals Jos Buttler and Nick Compton.
Buttler’s 67 came from just 49 balls and Compton held the innings together with 50 off 75.
Hogan struck with the fourth ball of the match, pinning back the off stump of out-of-form Somerset captain Marcus Trescothick.
Craig Kieswetter, fresh from striking 126 not out against Gloucestershire Gladiators, and Peter Trego also fell to Hogan either side of Jones bowling former Glamorgan skipper Alviro Petersen.
Trego hit 42 and more clean hitting came from Buttler, who took Somerset into three figures with a six off Jim Allenby.
Fifty-four runs were gathered in the four overs of batting powerplay, which ended with Compton being cleaned up by a Hogan full-toss.
Buttler's impressive contribution ended when he went lbw to Jones.
Glamorgan appeared to be in control thereafter, thanks largely to a brisk knock from Wallace containing six fours and two maximums.
However, Somerset refused to give in and almost pulled off an unlikely fightback.