Gloucestershire 396 for 7 (Dent 169, Higgins 101) lead Derbyshire 200 (Higgins 5 for 54) by 196 runs
Centuries from Chris Dent and Ryan Higgins put promotion contenders Gloucestershire into a strong position on the second day against Derbyshire at Derby.
Dent scored 169, his fourth hundred of the season, and shared a Gloucestershire record sixth-wicket stand against Derbyshire of 221 with Higgins, who made 101, as the visitors closed on 396 for 7, a lead of 196.
New Zealand allrounder Logan van Beek dismissed them both and Ravi Rampaul took two more wickets but it was a tough day for Derbyshire who will have to bat well to deny Gloucestershire victory.
Gloucestershire's objective at the start was to bat all day and Dent led by example as he played watchfully throughout a tense morning session.
Derbyshire made him work hard for the 32 runs he scored before lunch as the seamers maintained a disciplined line with Fynn Hudson-Prentice opening with five consecutive maidens.
But Dent was prepared to play a waiting game with his only lapse in concentration coming when he miscued a pull at Rampaul that fell to safety.
Miles Hammond was not so fortunate when he wafted at a wide ball in Rampaul's next over and was caught behind, but that was Derbyshire's only success before the interval.
Tom Smith was struck on the helmet by Rampaul but was able to continue and although Dent survived a difficult chance low to Wayne Madsen at first slip on 51, there were few false strokes as he batted his side into a strong position.
Derbyshire had a chance to deny Gloucestershire a sizeable lead when Smith played on to Matt Critchley and Ben Charlesworth was caught behind off Rampaul in the next over but Higgins was positive from the start, pulling Rampaul for six, as the visitors regained the initiative.
Dent celebrated his 18th first-class hundred when he glanced van Beek for his 10th four and although Madsen got his fingers to another tough chance on the stroke of tea, he had given the bowlers little encouragement.
Derbyshire took the new ball straight after the interval but after 10 overs, turned to the occasional left-arm spin of Leus du Plooy, perhaps to try and induce a rash stroke, as a breakthrough looked increasingly unlikely.
Dent went to 150 by cutting Hudson-Prentice for his 17th four and after the 200 stand was posted in 46 overs, Higgins turned van Beek for a single to complete a century which had come off 129 balls.
Dent finally went to the next ball as he chased a wide one and in van Beek's next over, Higgins played across the line and was lbw.
But with two days left in the match and the forecast good, Gloucestershire have a great chance of claiming the win that would take them a step closer to Division One.