Leicestershire 155 for 9 (Cosgrove 33, Raine 32) beat Worcestershire 150 for 6 (Ferguson 69, Griffiths 3-28) by five runs
Despite the best efforts of Callum Ferguson, Worcestershire Rapids fell short completing the victory that might have guaranteed themselves a home Vitality Blast quarter-final in their bid to reach Twenty20 finals day for the first time in their history.
The 33-year-old Australian, who registered his maiden T20 century against Nottinghamshire a week ago, played a superbly measured innings after Leicestershire had made 155 for 9 in their 20 overs.
He seemed on course to lead the Rapids to a fifth straight win after rescuing his side from a difficult start that had seen them in trouble at 32 for 3 in the fifth over, despite needing to maintain a run requirement of 10 per over from the halfway stage.
Worcestershire still needed 30 from the final three overs but Ferguson was hitting the ball so nicely it was difficult to see him not seeing them home.
However, his legs let him down when sixth-wicket partner Wayne Parnell called him through for a second run off the fifth ball of the 18th over and Mohammad Nabi's throw from long-on comfortably ran him out for 68, an innings that included nine fours and a six off 49 balls.
No one was more relieved than Neil Dexter, who had let him off by dropping a real sitter at midwicket earlier in the same Zak Chappell over.
There was still a scare to come when Chappell conceded three boundaries in his final over but hitting the six off the final ball to win the match and make up for his error over the run out proved beyond the crestfallen Parnell.
It was not all bad for Worcestershire: despite defeat at least they are certain of a last-eight place.
It was a first home win of the season for Leicestershire, who again looked to have come up short in their 20 overs as key batsmen gave themselves a platform to make a big contribution to the Foxes' cause only to squander their chance.
No one was more wasteful than Ben Raine, who looked in the mood to do some significant damage when he punished Pat Brown's opening over in aggressive style, cracking the country's top T20 wicket-taker this season with a six over extra cover and another back over the bowler's head before following up with two fours.
But having raced to 32 off 18 balls with the Foxes 45 for 2 at the end of the Powerplay he swung at and missed a ball from Daryl Mitchell that was rightly signalled a wide but neglected to anchor himself in the crease and Worcestershire' fine wicketkeeper Ben Cox is not one to squander such gifts.
Nabi was also the victim of his own carelessness, moments after he had cleared the ropes off the costly Brown, when he optimistically went for a second run to Ross Whiteley on the midwicket boundary off the same bowler and failed to make his ground by some distance.
Brown failed to add to his 22 wickets, his four overs costing 45 runs, but a poor day for the skilful 19-year-old was balanced by better ones for Wood and Wayne Parnell, who took an early wicket each as the Foxes stumbled to 6 for 2 in the second over and came back to strike important blows near the end.
Nabi came back well with the ball for the Foxes, conceding only 21 in his three overs and being unlucky not to claim a wicket or two. In combination with Callum Parkinson and Neil Dexter, who was also effective in taking the pace of the ball, he created the pressure on Worcestershire in the latter stages of the innings that was always likely to provoke mistakes.
And there were three key wickets for Gavin Griffiths, who made sure that Joe Clarke, Damian D'Oliveira nor Ross Whiteley could come up with the supporting innings for Ferguson that might have swung it for Worcestershire.