Stuart Meaker marked his first domestic Twenty20 appearance for two years with a career-best 4-30 as Surrey all but secured a home tie in the quarter-finals of the NatWest T20 Blast with a thrilling last-ball victory against Middlesex at Lord's.
In front of a crowd of 28,500 - the highest attendance for any domestic Twenty20 fixture in the United Kingdom - Zafar Ansari scrambled a single to cover secured a breath-taking two-wicket win.
Middlesex skipper Eoin Morgan had the chance to thrown down the stumps at the non-striker’s, but instead chose to lob to Dan Christian who did not have the time to take the bails as Ansari dived home.
Victory meant Surrey moved into second place in the South Group and will only miss out on a home last-eight tie if they suffer a wide-margin defeat in their final group game against Kent Spitfires tomorrow night.
Middlesex, who did not win a home game at Lord's all campaign, were left to rue a malaise at the end of their 137 for eight.
It appeared a below-par score until left-arm spinner Ravi Patel, who was selected in the England Lions squad earlier on Thursday, took 2-15 to dizzy Surrey in the middle overs.
The visitors just about regrouped though with Kevin Pietersen, Rory Burns and Azhar Mahmood all hitting 28.
Middlesex opener Joe Denly, who was dropped by Gareth Batty at slip on two, lifted Matt Dunn over mid-off for four and cut Meaker fortwo successive fours, the second of which Ansari managed to get a hand to.
Denly was eventually bowled for 16, attempting to hit Mahmood over mid-wicket, but with Morgan pulling Tillakaratne Dilshan to long-on Middlesex were 51 for one at the end of the powerplay.
In the seventh over, Morgan backed away and cut Batty through extra cover for four, before repeating the stroke for a maximum.
Dilshan, who conceded just18 runs off his four overs, bowled Dawid Malan, who was on the walk, for 25.
But after a handy third-wicket stand of 42 between Morgan and Ryan Higgins, the Middlesex innings fell away badly, collapsing from 113 for three to 128 for eight.
The 13th over had seen Higgins slog sweep Robin Peterson for two sixes.
Morgan lifted Batty over mid-wicket for a maximum, too, but was bowled for a 32-ball 43 when he failed to detect Meaker’s slower delivery.
Higgins was yorked for 21 in the same over, though not before Dan Christian had announced himself by cutting his first ball for four.
Neil Dexter was caught at deep backward square-leg, Gary Wilson swooped at extra cover to run John Simpson out at the bowler’s end and Ollie Rayner was bowled without scoring by Mahmood.
Meaker picked up a fourth wicket when Christian fell to Batty’s superb catch at long-on in the penultimate over.
In reply, Surrey were checked initially by Steven Finn’s pace and bounce.
Jason Roy was handed a life on nought when Rayner failed to hold on after running around from slip to third-man. But Finn was had his reward when Dilshan, fending at a bouncer, was caught behind.
Roy and Pietersen added 48 in six overs, with Pietersen clipping Finn through the onside for a couple of boundaries.
After being struck on the helmet by Harry Podmore, Roy was handed another reprieve, on three, when Higgins, at deep square-leg, lost the ball in the setting sun. Roy took full advantage of a free hit by clubbing Podmore over long-on for six.
Roy punched two successive fours square, either side of the wicket, off Christian only to dance down the wicket to Patel’s third ball to be stumped for 21.
Pietersen reverse-swept Rayner for four before holing out to long-off and wth the runs drying up, Wilson was also stumped off the impressive Patel.
Rory Burns slog swept Dexter for a six and followed it up with a cut four.
With Mahmood clipping to fine-leg and top-edging a pull off Christian, Surrey were left needing 32 off the last five overs.
Burns made 28 off 19 balls before top-edging an on-drive high to the keeper off Podmore. A superb diving catch by wicketkeeper Simpson off Podmore then saw the back of Mahmood.
With Ansari and Peterson finding the gaps, even against Finn, Surrey only required six to win off eight balls when Peterson lobbed a catch to mid-off.
Batty was then caught a deep mid-wicket off Christian to leave five runs needed from five balls, but Ansari and Meaker just held their nerve.
Wilson, the Surrey captain, said: "It was great to get over the line there at the end, but it was very close and full marks to Middlesex for making us fight all the way.
"It is important to get a home quarter-final tie, which we virtually have done now, because we think we know how to win matches at the Kia Oval."
Middlesex captain Morgan said: "We would have liked about 20 more runs and we should have got more. We also dropped a couple of catches early on, which didn't help us.
"It's been a disappointing campaign but we just haven't played well enough at certain times of most games.
"Steven Finn, though, bowled with international-class pace and bounce tonight and Harry Podmore has been one of the plus points for us from the Twenty20 group stage."