Essex suffered just their second defeat in this season's NatWest T20 Blast as Gloucestershire recorded a surprise six-wicket triumph at Cheltenham.
Chris Dent blasted an unbeaten 55 off just 23 balls as the hosts upset the South Division leaders, successfully overhauling their total of 183-7 with two deliveries remaining.
The left-hander hit five sixes and two fours after skipper Michael Klinger, who made 45, and opening partner Alex Gidman (27) had laid down the foundations for a successful run chase with a stand of 71.
Ian Cockbain also contributed 27, helping add 70 in six overs before being bowled by Graham Napier at the start of the 19th over.
However Dent saw Gloucestershire over the finishing line; needing 12 off the last, he took Matt Salisbury for a pair of twos before hitting a six and a four to see his side home in style.
Ravi Bopara had earlier benefited from being dropped three times to make 51 and Ryan ten Doeschate thrashed 27 off nine balls at the death to help Essex post a competitive total.
They lost Tom Westley for a first-ball duck in the opening over but Mark Pettini (26) and Kishen Velani, who made34 from 23 balls, responded with a stand of 42.
Bopara was missed on four and 19 by Gloucestershire, allowing him to go on and add 52 in 34 balls for the fifth wicket with Ben Foakes (23).
The England international was missed again before he finally perished in the 18th over, one of four wickets for Benny Howell.
Yet if Gloucestershire thought that was the end of their problems, Ten Doeschate had other ideas. The Essex skipper smacked two fours and two sixes in his cameo and 19 came off the final over, sent down by Graeme McCarter.