Middlesex 304 for 6 (Franklin 62*, Ingram 3-24, de Lange 3-65) beat Glamorgan 302 for 9 (Lloyd 92, Patel 3-58) by two runs
Middlesex defeated Glamorgan by the slender margin of two runs in a high-scoring game at Sophia Gardens, and achieved their second successive win in the competition.
Glamorgan, meanwhile, suffered their third loss and need to win nearly every game to have any chance of qualifying.
The home side needed 16 from the last over and would have tied the game had the final blow from Timm der Gugten against the Middlesex pace bowler Tom Helm, with six needed, not landed a metre or so inside the boundary.
Earlier, Middlesex, who were put in on a true pitch, made 304 for 6 with three batsmen passing 50, but no one going on to reach three figures.
Paul Stirling and Nick Gubbins gave their team a rapid start, with 50 coming in the first seven overs, with eleven boundaries struck by the openers, before Stirling wafted at a ball wide of the off stump, with the edge well taken by wicketkeeper Chris Cooke.
Gubbins was strong through the offside, but shortly after reaching his half century, he was well held low down on the cover boundary by Aneurin Donald, his 53 coming from 55 balls with 4 boundaries.
Steve Eskinazi and Eoin Morgan then settled into a productive partnership, and at 185 for 2, Middlesex appeared set for a large total, but Colin Ingram had other ideas, as he dismissed Morgan, Eskinazi and John Simpson in his first three overs.
Morgan had made 57 from 55 balls, before attempting to hit Ingram into the River Taff, he holed out on the long on boundary. In his next over, he had Eskinazi caught down the legside by Cooke, before Simpson gave Cooke his third catch when he edged behind.
The visitors then recovered, thanks to a breezy 62 not out from James Franklin, and with a wayward over from De Lange yielding 20 runs, Middlesex went past 300.
Glamorgan, needing to score at 6.1 an over, also made a promising start, with Nick Selman and Aneurin Donald, who was dropped for the two opening games, racing to 50 in the ninth over. They put on 86 before they were dismissed in successive overs by Ravi Patel. Donald edged to the wicketkeeper, before Selman was unlucky to be given out LBW with a ball that pitched outside leg stump.
Worse was to follow, when Shaun Marsh drove Stirling's first ball back at the bowler, with Glamorgan having lost three wickets for ten runs after their good start. Ingram was then joined by David Lloyd, and after a steady start they accelerated, with Lloyd, the junior partner, playing the major role. He was the first to reach 50 before driving Patel and Nathan Sowter for two straight sixes.
When Steven Finn and Helm returned to the attack, they were also struck over the ropes, but when the fourth wicket pair had added 126, Ingram swept Patel into the hands of Cartwright at deep square leg. Cooke soon followed, then Lloyd's excellent innings ended when Sowter fired one down the leg side to have him stumped for 92 from 75 balls.
When Andrew Salter was out, Glamorgan required 37 from 28 balls, then 22 from the last two overs. But when Wagg was bowled in the penultimate over, Glamorgan's chase faltered, for all der Gugten's attempt to remedy matters at the last.