Gloucestershire 174 for 6 (Noema-Barnett 57*, Morkel 3-34) beat Surrey 169 for 7 (Foakes 59, Clarke 35, Payne 3-29, Howell 3-31) by five runs

Gloucestershire's bowlers held their nerve to defeat Surrey by five runs in a tense match at Bristol and secure a place in the quarter-finals of the Vitality Blast.

Kieran Noema-Barnett registered a career-best-equalling 57 not out as Gloucestershire posted 174 for 6 on a drying pitch.

When Ben Foakes raised 59 from 39 balls and added 66 for the fifth wicket with Rikki Clarke, it looked as though Surrey would win. But David Payne bowled Foakes in the penultimate over and Ryan Higgins frustrated the eighth wicket pair of Morne Morkel and Mat Pillans with 12 needed off the final over.

Gloucestershire captain Michael Klinger said: "Our total was a bit below par, but we've defended less than that and still won games here. David Payne getting Ben Foakes out was the turning point for sure. But we had to take a few risks today, such as bowling out our best bowler, Andrew Tye, early to try and put the run rate up."

For Surrey, there is a tense final week ahead. Foakes said: "I thought we had a good chance when Rikkie Clarke and I were in at about halfway. We had it down to about a run a ball, but when I got out it was at a crucial time and we threw it away a bit. The wicket was difficult, but the short boundary made 174 a very gettable total. We just let it slip from our grasp.

"We're struggling to make the last eight and are definitely depending on other results going our way. We just have to try and win our last two games and see what happens."

In irresistible form with the bat when putting Middlesex to the sword four days previously, Gloucestershire struggled to build momentum after being put in to bat.

Too many batsmen had starts, only to surrender their wickets in meek fashion, and the home side were indebted to Noema-Barnett and Gareth Roderick, who staged a restorative unbroken stand of 51 in four overs for the seventh wicket to carry their team to respectability.

Otherwise, Gloucestershire's batsmen found their progress stymied by the nagging line and length of veteran Clarke and South African paceman Morkel, who returned figures of 2 for 27 and 3 for 34 respectively.

Miles Hammond played across the line at and missed a straight ball and was bowled for 15 by Morkel, while fellow opener Michael Klinger pulled a short delivery from Clarke straight to Nic Maddison at midwicket for nine.

Benny Howell signalled his intent by plundering 14 runs off one Pillans over as Gloucestershire advanced to 50 for 2, but he was out soon afterwards for 28, held at long-on in the act of driving Gareth Batty.

Having scored his maiden T20 hundred in the previous match, Ian Cockbain flattered to deceive on this occasion, chipping a length ball from Morkel straight to Jason Roy at mid-off for nine.

Clarke changed ends and induced Ryan Higgins to sky a catch to wide mid-on, while Jack Taylor miss-timed a drive and was held at mid-on to become Morkle's third victim as Gloucestershire continued to stutter.

But Pillans and Freddie van den Bergh proved rather more expensive, sending down a combined tally of four overs for 55 runs.

Playing to his strengths in an innings that spanned 37 balls, Noema-Barnett went to his first T20 50 for Gloucestershire in the grand manner, hoisting Pillans over the deep square leg boundary for his fourth six.

Defending a modest total, Gloucestershire needed to take early wickets and did so, England white ball international Roy lofting David Payne to deep square leg for 15, Rory Burns shuffling in front of a straight ball from the same bowler and Will Jacks top-edging a pull shot behind off Noema-Barnett.

When Maddinson holed out to deep mid-wicket off the bowling of Howell, Surrey were 66 for 4 in the ninth over and in danger of under-achieving.

But Foakes and Clarke redressed the balance, plundering 31 runs from the ninth and tenth overs, at which point the visitors needed 78 from 10 overs.

Howell had Clarke held at long-off and then bowled van den Bergh with 30 needed off four overs, while Payne removed key man Foakes in the 19th over to alter the complexion of the game.