Derbyshire 296 for 6 (Slater 82) beat Warwickshire 292 for 7 (Hain 109, Bell 93, Thakor 3-48) by four wickets
The international experience of Jeevan Mendis took Derbyshire to a four wicket victory that knocked holders Warwickshire out of the Royal London One-Day Cup.
The Sri Lankan all-rounder hit six fours and a six in an unbeaten 44 off 23 balls to steer Derbyshire home with two balls to spare to keep alive their hopes of finishing in the top three of the North Group.
The visitors' 292 for 7 was built on Sam Hain's highest one-day score of 109 and Ian Bell's 93 but Ben Slater set Derbyshire up with 82 before Mendis carried the home side to 296 for 6.
Four times in less than a fortnight Derbyshire have recorded scores that all rank in the top 20 they have ever made in one-day cricket.
Warwickshire first team coach Jim Troughton admitted: "We knew we wanted 20 extra runs which would have given us a cushion for a little cameo there from Mendis who played exceptionally well. When you lose by a small margin it's a tough one for the guys to take."
His side would have expected to go past 300 when Hain and Bell accumulated steadily after Jonathan Trott had played on to Ben Cotton in the eighth over.
Although only 43 came from the opening Powerplay, conditions were good for batting under a cloudless sky and runs came more freely as Hain and Bell relied on placement rather than power.
Hain's second 50 came from only 38 balls but when he gave himself room to drive Thakor through the covers, he lost his middle stump which ended Warwickshire's highest stand for any wicket against Derbyshire in one-day cricket.
Bell's run out four overs later, going for a second on a misfield, meant Warwickshire had two new batsmen in and the innings stalled against tight bowling backed up by sharp fielding.
Rikki Clarke went cheaply against the club he used to captain and, although Tim Ambrose dented Ben Cotton's figures by pulling him for two consecutive sixes, he was lbw hitting across the line at Thakor.
When Hardus Viljoen conceded only four off the bat in the final over, Warwickshire had been restricted to 44 from the last seven although Derbyshire still needed to make their highest one-day score against them to win.
They were given a solid start by Slater and Billy Godleman who made 46 before he was sent back and run out for 46 in the 18th over as the spinners checked the home side's progress.
Clarke profited when he returned to have Thakor caught at deep mid on for 20 and although Slater pulled Ateeq Javid for six, he was bowled attempting the same shot at Patel two overs later.
When Wayne Madsen was lbw to Keith Barker, Derbyshire needed 120 from the last 15 overs but Daryn Smit pulled Mark Adair for four and six to reduce the target to 84 from 10.
Alex Hughes helped add 62 in nine overs before Mendis took over, clubbing Clarke for six before he sealed victory with a drive down the ground off Barker.
Mendis said: "I wanted to play a good innings for Derbyshire but this was a team effort. The senior players have done well and it gives the younger players a boost to help them in the future.
"Every time I go out to bat I get nervous and batting at No 7 is hard because you get few balls to play yourself in so you get little time to get going."