Sussex 215 for 5 (Salt 66) beat Middlesex 184 (Simpson 62, Stirling 58, Briggs 2-22) by five wickets
Sussex were given a fright by Middlesex before reaching the quarter-finals of the Vitality Blast for the first time since 2015 with a 31-run win at Hove.
Skipper Luke Wright, returning after missing two games with a back spasm, made 74 and fellow opener Phil Salt hit 66 from just 25 balls in their 215 for 5 after they had been put in.
Rapid half-centuries by Paul Stirling and John Simpson, who shared 122 in 8.1 overs for the second wicket, had Middlesex on course for victory halfway through their reply, but leg-spinner Will Beer removed both in successive overs and Middlesex's hopes of claiming only their second win of the season effectively ended when Eoin Morgan was run out in the 15th over. They lost their last seven wickets for 26 in 5.4 overs and were bowled out for 184 in 19.4 overs, finishing the group with just two wins.
Sussex knew only victory would secure a last-eight place and Salt and Wright set the tone by smashing 80 in the powerplay. Salt matched the 19-ball 50 he made against Middlesex at Lord's as James Fuller's first two overs were taken for 38. Salt struck four sixes and eight fours before slicing a drive off James Harris to short third-man from the final ball of the sixth over.
Wright became the first Englishman to pass 7,000 T20 runs when he reached 12 and he went on to put on 106 in 11.1 overs for the second wicket with Laurie Evans, whose 36 took him to 492 runs in the group stages.
Fuller pegged Sussex back by taking three wickets in four balls during the 16th over. Evans drove his slower ball to cover, Delray Rawlins was caught at short fine-leg off the next delivery and Wright mis-timed a drive to extra cover, having faced 48 balls and hit nine fours in his 44th half-century in the format.
Morgan used seven bowlers but was unable to prevent Sussex from making their highest T20 total against Middlesex.
Middlesex needed to score at nearly 11 an over but after losing George Scott in the first over Stirling and Simpson laid into some wayward bowling, outscoring Sussex by thrashing 90 in the powerplay. Rashid Khan was missing as he prepares for Afghanistan's one-day series in Ireland next week and it was his replacement Beer who made the breakthrough when Stirling chopped on for 58 from 29 balls (3 sixes, 6 fours).
Beer struck again in his next over when Simpson holed out to long off for 62, made off 29 balls with six sixes and four boundaries, but Sussex were only able to breath easily after taking two wickets in the 15th over. Danny Briggs ran out Eoin Morgan (16) off his own bowling when Morgan failed to make his ground going for a tight single and James Franklin was caught behind off a big top edge.
Middlesex subsided thereafter and Chris Jordan finished things off when he yorked Nathan Sowter and Tom Barber with successive deliveries in the final over.
Coach Dan Vettori was left to reflect on another poor Midedlesex season. "We've run the whole gamut of how to lose T20 games this season," he said. "We were poor at the start with the ball tonight, but managed to drag it back on a small ground with a tiny boundary to defend.
"When we batted we had it comfortably in control but losing four wickets in two overs when you have to face Mills, Jordan and Archer at the death... you almost have to kill the game before that happens and instead we killed the game for ourselves."