Centuries from Josh Cobb and Greg Smith helped Leicestershire end Somerset's perfect record in Group C of the Yorkshire Bank 40 competition.
The two openers shared a record 235-run stand - the biggest for the county in one-day cricket - as the Foxes chased down a target of 324 with six wickets and seven balls to spare at Grace Road.
It was the highest successful run chase for Leicestershire, beating the 289 they managed against Durham back in 1996.
Cobb blasted 130 from just 87 deliveries with 20 fours and a solitary six before Somerset finally ended his onslaught when Steve Kirby yorked the home captain.
Smith, however, saw the job through to the finish, ending up unbeaten on 135; he faced 109 balls for his runs, hitting a six and 18 boundaries.
Joe Burns, Ned Eckersley and Matt Boyce all went cheaply as the Foxes stuttered but Shiv Thakor (18 not out) joined Smith in a fifth-wicket stand that saw the hosts over the line.
The twin centuries from the two Leicestershire players eclipsed the efforts of Peter Trego earlier in the day, the all-rounder having made 118 in Somerset's total of 323-4.
He put on 120 with skipper Marcus Trescothick at the top of the order and a further 77 with Alviro Petersen before finally being dismissed by Nathan Buck.
Petersen (63 not out) and Jos Buttler (54no) shared a fourth-wicket stand of 82 in the last seven overs, helping Somerset get past 300 for the second time in four outings in the 40-over tournament this season.