Michael Klinger once again led from the front as Gloucestershire kept alive their hopes of a place in the Yorkshire Bank 40 semi-finals with a thrilling two-wicket Group C win over Glamorgan at Bristol.
The skipper took his run tally in the competition to 662 at an average of 94.57 by scoring 87 to help the hosts to their target of 248 with just one ball to spare.
Hamish Marshall contributed 55, while Dean Cosker claimed 2-28 from his eight overs.
Gareth Rees had scored 83 off 110 balls to provide the backbone to Glamorgan's 247-7 after winning the toss, with Murray Goodwin also making a brisk 49 and Tom Smith returning 2-43.
Rees might have been run out in the opening over of the game as Mark Wallace sent him back attempting a single to backward point. Ian Cockbain's shy at the stumps missed when he could have given wicketkeeper Gareth Roderick time to get to the stumps.
The Glamorgan openers went on to build a half-century stand before Wallace departed for 18, caught at deep square as he pulled a ball from David Payne.
Gloucestershire introduced the left-arm spin of Smith for the 16th over and the loan recruit from Middlesex had Chris Cooke caught behind cutting for 19 with the total on 83.
It was 95-3 when Marcus North fell cheaply to Smith. Rees reached fifty off 62 balls, with five fours, and survived a stumping chance off Smith when on 63.
After Jim Allenby (28) lifted a catch to deep mid-wicket off Benny Howell, Goodwin supplied the necessary acceleration with six fours in his 32-ball innings, helping the score to 199 when he gave a catch to backward point.
Graham Wagg hit a straight six in making 19 before being yorked by Craig Miles and Rees took successive boundaries off the penultimate over, bowled by Payne before being caught at mid-off to give Miles a second wicket.
Gloucestershire made a confident start in reply as Klinger and Marshall put together a century opening stand, the latter hitting six fours in his 43-ball innings before offering a return catch to Cosker.
Klinger continued his love affair with the competition, striking nine fours in facing 99 deliveries before getting an inside edge on to his stumps off Simon Jones with 49 runs still needed.
There were nerves in the home dressing room when Alex Gidman followed for 28, but Howell (23) played a key role with a six and a four off Jones in the 38th over, which cost the seamer 17, followed by another six off Wagg.
Wagg responded with two wickets in the same over, but the home side began the final one from Michael Hogan needing only five. He removed Smith caught and bowled, but James Fuller hit the winning boundary.
The result puts Gloucestershire level on points with group leaders Somerset, with the two arch-rivals facing each other at Bristol in the final group match tomorrow week.
Glamorgan are two points adrift, but have two games remaining, at home to Leicestershire next Sunday and away to Yorkshire 24 hours later.