Surrey 170 for 9 (Roy 55, Pope 48, Taylor 3-27, Payne 3-37) tied with Gloucestershire 170 for 6 (Webster 40)
David Payne grabbed a breathless tie for Gloucestershire against Surrey, dismissing both Tom Curran and Sean Abbott in a brilliant final over in which he also conceded just four runs plus a scampered bye to the keeper.
Surrey needed just six runs to win after Curran's breezy 18 had followed Jason Roy's 55 and Ollie Pope's 48, which had spearheaded a thrilling chase under the Kia Oval floodlights, but finished on 170 for 9.
But the veteran Payne was equal to the task, yorking Curran with his first ball and having Abbott caught in the deep off his third. Then came the bye, and a two driven by Jordan Clark. But, with scores level and the field in, Payne fired in another yorker that Clark could only dig out back towards the bowler. He set off for the winning single but Payne only had to move a few yards to his right to take the ball and, jubilantly, run him out at the bowler's end.
Miles Hammond's 25-ball 33 earlier combined nicely with Cameron Bancroft's 32 from 26 to post 67 for Gloucestershire's first wicket and despite a mid-innings stutter, in which four wickets fell for 28 runs, they ultimately reached 170 for 6.
All-rounder Beau Webster clubbed sixes off Gus Atkinson and Curran in a 31-ball 40, before holing out to the penultimate ball of the innings, after Ben Charlesworth had also provided late momentum with a quickfire 24, taking two sixes off Abbott in the 16th over.
Surrey's reply began badly, with Dan Lawrence edging Payne to slip for four in the opening over and Gloucestershire's other left-arm paceman, Matt Taylor, striking with his first ball to have Laurie Evans caught behind for six to leave the home side 20 for 2 in the fourth over.
Roy and Pope, though, rallied Surrey with a stand of 96, a county T20 record for the third wicket against Gloucestershire, but at the halfway mark Surrey were 77 for 2, only three runs ahead of their opponents at the same stage.
Webster's tight medium pace was at this stage keeping Gloucestershire in the game but Pope, on 25 and with Surrey 87 for 2, was badly dropped off Webster in the 12th over, by Josh Shaw at short third.
With 81 required from eight, Payne was recalled but Pope flamboyantly scooped his first ball back for six over the keeper's head and hit the next high and straight for four. Roy then flipped a six over long leg to reach a 37-ball fifty in an over costing 20.
Marchant de Lange did bowl Roy, who hit two sixes and five fours, but Smith drove his first ball authoratively for four and an equation of 44 from the last five overs became 32 from four after Smith drove De Lange high for six and collected a fortuitous four for a gloved hook on to helmet and away to third.
On 20, though, Smith mishit Matt Taylor to long on and, later in the same 17th over, Pope sliced to point. Curran took two fours from the returning Webster but Dom Sibley was leg-before to Shaw for 1 before that dramatic final over.
Gloucestershire openers Hammond and Bancroft did well to take 50 from the initial six-over powerplay, especially after Spencer Johnson and Atkinson had allowed just five from the first two overs.
Pacy left-armer Johnson, however, was scooped spectacularly by his fellow Australian Bancroft for a remarkable six to fine leg in his second over, and Bancroft then lofted off-spinner Lawrence straight for another six.
Hammond also slammed Lawrence over mid off for six and in an eventful eighth over swung Clark for his third maximum, after Bancroft had pulled a four, before losing his off stump attempting an optimistic ramp stroke.
Bancroft departed to the first ball of a 10th over costing just a single, lofting Curran to deep cover, James Bracey (9) hit Abbott to deep midwicket and Jack Taylor was needlessly run out for seven, stranded when he was sent back by Webster in the 13th over.