Division Two leaders Derbyshire suffered their first County Championship defeat of the season, going down by seven wickets against Gloucestershire on day three at Bristol.
Gloucestershire reached a target of 85 for the loss of three wickets in the afternoon session.
After Jonathan Batty was trapped lbw by Tony Palladino in the first over of the run chase, Benny Howell and Kane Williamson put on 52 for the second wicket to take the home side to the brink of victory.
Jonathan Clare (2-17) removed Howell (31) and Williamson (29) in successive overs but Alex Gidman and Hamish Marshall combined to see Gloucestershire over the line without further loss.
At the start of the day Derbyshire had advanced their second innings from 211-5 to 283 all out.
Dan Redfern top scored with 77 and Clare finished unbeaten on 43, while Gloucestershire seamers Will Gidman (4-50) and David Payne (4-89) each finished with four wickets.
Alex Gidman hit his first century in over a year as Gloucestershire assumed command of the Division Two clash with Derbyshire on day two in Bristol.
Gidman's 129 helped the hosts make 294 for a first-innings lead of 199, having skittled Derbyshire for just 95 on day one.
The visitors offered more resistance in their second dig, reaching stumpes on 211-5 thanks to half-centuries from skipper Wayne Madsen and Dan Redfern to at least ensure Gloucestershire must bat again.
Gidman's brother Will took four of the five wickets to fall, with the home side only held up by the 97-run, fourth-wicket stand between Madsen (72) and Redfern (64no), but it was Alex who was the star on a day when batting proved difficult under leaden skies.
His five-hour stay at the crease saw him form critical partnerships of 81 with Kane Williamson and 63 with Hamish Marshall and comprised of 227 balls after Gloucestershire resumed in the morning on 182-5.
He was eventually ninth out, lbw to Tim Groenewald (3-66), prompting Will (4-39) to take over and leave table-topping Derbyshire on the brink of a rare defeat.
County Championship Division Two leaders Derbyshire were bowled out for just 95 on the opening day of their clash with Gloucestershire at Bristol.
Derbyshire are yet to lose a four-day game this season but will do well to keep the unbeaten run intact after they were wiped out in less than 33 overs before the hosts reached 182-5 by the close.
The visiting side chose to bat after winning the toss but were soon regretting that choice as Will Gidman (4-29) and David Payne (3-23) ripped through the top order.
Five batsman reached double figures, with Wes Durston (18) the best of them, while the tail was swept away completely, with Will Gidman running out hapless last man Tony Palladino (3) to complement his four wickets.
Gloucestershire got off to a similarly troubled start, with openers Jonathan Batty (2) and Benny Howell (10) falling inside the first the first 10 overs, but the ship was soon steadied.
Kane Williamson (56) and Alex Gidman (72 not out) put on a third-wicket stand of 81, laying the foundations for Gloucestershire to build a lead of 87 by the close.