Jack Taylor and Benny Howell blasted 69 off the last four overs to give Gloucestershire an amazing six-wicket Royal London Cup win over Derbyshire at Bristol.
Hamish Rutherford and Wayne Madsen had profited from a poor home display fielding to score centuries as Derbyshire ran up 274 for five from 48 overs after losing the toss.
Rutherford equalled his career-best List A score of 110, while Madsen finished unbeaten on 106.
Heavy showers meant Gloucestershire faced a twice revised target of first 284 from 48 overs and then 204 from 35. They finished on 205-four in a bizarre finish.
Taylor looked to have been caught off the final ball of the game with a six needed, but as Derbyshire celebrated square-leg umpire Alex Wharf signalled a no-ball for too many fielders on the leg side.
A single was taken, which with two extras for the no-ball left three required. Howell smashed the last delivery straight for four to spark wild scenes of celebration.
Derbyshire’s innings had got off to a poor start when Billy Godleman was caught at point off David Payne off the seventh ball of the match.
Wes Durston and Madsen then added 55 without looking entirely comfortable before Durston, on 25, miscued a pull shot off Craig Miles to Tom Smith at deep square.
Kieran Noema-Barnett was unlucky not to cement Gloucestershire’s position as he first had Madsen dropped on seven by Howell at mid-on and then Rutherford, on 46, spilled by Payne at backward point.
The hosts were made to pay heavily for their generosity. Some sloppy ground fielding followed and by the time rain intervened, Derbyshire were 198 for two from 42 overs.
The resumption saw Rutherford reach his hundred off 127 balls, with 9 fours and a six, before falling with the total on 240, caught low down at extra cover by Michael Klinger off James Fuller.
The partnership of 182 with Madsen beat the previous best List A stand for Derbyshire against Gloucestershire, 165 by John Morris and Geoff Miller at Gloucester in 1984.
Madsen followed his partner to three figures, having faced 97 balls, with 9 fours and a six, his second fifty coming off just 24 deliveries.
Gloucestershire’s hopes of reaching their revised target suffered a double blow in the eighth over, which began with Chris Dent hitting 4,6,4 off Ben Cotton.
The seamer responded by bowling Dent for 31 and then claiming the prize wicket of Michael Klinger, who got an inside edge onto his stumps.
Geraint Jones was run out for 27 responding to a call from a quick single from Gareth Roderick, who was never able to maintain the required rate.
When a second rain interruption to the Gloucestershire innings at 136 for three left the home side needing 68 off four overs, the outcome looked beyond doubt.
But when Roderick was run-out for 54, slipping, Taylor came in to hoist leg-spinner Matt Critchley for 3 sixes in an over to set up an incredible finale.
Wes Durston, only just appointed Derbyshire’s one-day captain, said: “As skipper I have front up and take responsibility for what happened. We had only three men on the off side for what we thought was the final delivery and the rules meant it was a no-ball.
“It was an oversight on my part and a terrible way to lose a game we controlled almost throughout. Fair play to the Gloucestershire batsmen who hit out at the end, but even they didn’t know what was happening when the no-ball was signalled.
“I originally thought it had been given for too many men outside the circle, which was not the case, and that is why I protested. Rules are rules and we have to take it on the chin.”