With Leaning watching from the non-striker’s end after scoring 48 from just 30 balls, Raine pinned Adil Rashid leg before with a well-pitched up delivery to delight the Grace Road crowd.
“It feels like a win, to be honest, because we felt we were 10 to 20 runs short of a competitive total,” said Raine. “But we fought to save every run and took some brilliant catches, and it just goes to show you should never, ever give up.”
Badly needing two points to improve their chances of qualifying for the quarter-finals, the Vikings named a side that included England players Jonny Bairstow and Rashid, as well as fit-again Australian opener Aaron Finch, resuming his place at the top of the order after recovering from a bruised lung suffered in a second XI championship match earlier in the week.
Leicestershire welcomed back New Zealand international batsman Grant Elliott, as well as destructive Ireland international hitter Kevin O’Brien, a key member of their T20 line-up this season.
Yorkshire captain Andrew Gale chose to bowl first on a slow, low track, and his seamers kept Leicestershire under pressure from the start.
Foxes’ skipper Mark Cosgrove holed out to Glenn Maxwell in Matthew Fisher’s first over for four and Maxwell also took a good low catch running in from deep backward square to see the end of Kevin O’Brien off the bowling of Will Rhodes.
The Vikings continued to take vital wickets, with only Andrea Agathangelou giving the innings any real impetus before being run out for 40.
Leicestershire’s bowlers struck back quickly when Clint McKay had Finch leg before for just two, but Bairstow, in ever increasing gloom, timed the ball superbly, hitting Raine for a six and four off consecutive balls before being bowled by Raine for 37.
Maxwell was also threatening to take the game away from Leicestershire when he was brilliantly caught at midwicket by Jigar Naik off the bowling of Ollie Freckingham for 10, and the Foxes continued to fight to save every run.
Leaning, though, played with real maturity in placing his shots and running hard, and received good support from Rhodes (11).
Between them they looked to have done enough, but Rhodes was well caught low down by Naik, Richard Pyrah (three) was caught at long on, and Raine’s final over was good enough to secure the tie.