Gloucestershire 162 for 6 (Taylor 44*, Cockbain 42) beat Middlesex 156 for 5 (Simpson 40*, Howell 3-18) by four wickets
Benny Howell took his wicket tally in the NatWest T20 Blast South Group to 23 as Gloucestershire made sure of finishing top with a four-wicket victory over Middlesex at Bristol.
The competition's leading wicket-taker claimed 3 for 18 from his four overs to help restrict the visitors to 156 for 5 after winning the toss. John Simpson top scored with 40 not out, while spinners Tom Smith and Graeme van Buuren both bowled tightly.
In reply, Gloucestershire reached 162 for 6 with three balls to spare, Jack Taylor seeing them home with an explosive 44 off 23 balls, including 4 sixes, after Ian Cockbain had contributed 42.
Some of the edge was taken off the game by the fact that both sides were already sure of quarter-final places, in Gloucestershire's case with home advantage. But it still produced a thrilling finish.
Middlesex made a promising start to their innings as Nick Gubbins and Stevie Eskinazi scored 52 off the first five overs before Gubbins, on 29, having hit 3 sixes, skied a catch to on-loan wicketkeeper Phil Mustard off Andrew Tye.
James Franklin fell cheaply against his old club, stumped in Howell's first over. But it was the all-rounder's second over that proved most damaging as he had Eskinazi caught at short third-man for 29 and George Bailey lbw for one three balls later.
The Middlesex innings got bogged down against Howell, typically effective with his pace-off-the-ball seamers, and the two Gloucestershire spinners, who shared seven overs at a cost of just 36 runs.
Simpson and Ryan Higgins did their best to pick up the pace in the closing overs, while Toby Roland-Jones hit a four and a six off the last, sent down by Tye. But the Middlesex score still looked below par.
Gloucestershire made a brisk start in reply, Michael Klinger and Hamish Marshall taking the score to 31 in the third over before Marshall, on 16, was run out attempting a second to third-man and failing to beat Roland-Jones' throw to the keeper.
That brought together two of the leading run-makers in the competition, Klinger and Cockbain, who soon overtook his skipper. An out-of-sorts Klinger was dropped on ten by Nathan Sowter at deep cover off Harris before falling for 13, caught trying to reverse sweep the relieved Sowter.
Mustard was quickly bowled by Franklin and when Roland-Jones struck twice in the 15th over, having Cockbain caught at cover and bowling Howell as he advanced down the track, Gloucestershire looked to be in trouble at 101 for five.
Taylor hit the first six of the innings as 14 came off the 17th over, bowled by Harris, and van Buuren followed up with a maximum off Ollie Rayner before falling next ball.
With 24 needed from the last two overs, Taylor blasted successive sixes off Roland-Jones and nine were required as Steve Finn prepared to bowl the last six deliveries.
The first was a no-balled bouncer costing two extras. Taylor missed the next one and smacked the next to mid-wicket where the diving Sowter failed to gather and let the ball slip through for a boundary.
The scores were level when Finn was no-balled again for a bouncer and Taylor cut the next delivery for six over cover to end the game.