Derbyshire require a further 79 runs after tea to beat Gloucestershire at Bristol and register their first victory of the season.
Gloucestershire were bowled out for 411 shortly after lunch, having seen Lima Norwell caught behind off Mark Footitt for 17 and Matt Taylor taken at backward point by Martin Guptill off Shiv Thakor for a duck.
Craig Miles was left unbeaten on 31, having struck five fours, while Derbyshire seamer Footitt finished with six for 94 and match figures of nine for 166.
Derbyshire had a minimum of 53 overs in which to get the 142 runs required for victory, and openers Ben Slater and Billy Godleman knocked 63 off that target by tea.
Slater, who survived a big appeal for caught behind off Norwell on 19, was on 20 at the interval and Godleman has made 41.