Three late wickets gave Sussex a major boost after Derbyshire's batsmen had made the home side toil for much of day two of their Specsavers County Championship match at The 1st Central County Ground.
Visiting captain Billy Godleman made 122, his 11th century for the county, as Derbyshire replied with 315 for 5 after Sussex had been dismissed for 440 in the morning session.
The 29-year-old left-hander has had a disappointing season in red-ball cricket and came into the game averaging just 13 with a previous top score of 61.
But he put that behind him with a composed knock, made in 273 minutes off 196 balls with 14 fours – most of them cuts and square drives – and a six hoisted over the short scoreboard-side boundary off left-arm spinner Danny Briggs.
Godleman shared an opening stand of 70 with Ben Slater before Slater (24) played away from his body to Ollie Robinson and was held at third slip by Phil Salt.
Godleman and Wayne Madsen then shared a fluent stand of 130 for the second wicket. Madsen hit ten boundaries in his first 50 and it was a major surprise when he carved the first ball after tea to backward point off Chris Jordan’s loosener for an excellent 72 off 91 balls with 13 fours.
Jordan and Jofra Archer bowled good spells at the start of the final session and Derbyshire could only score 23 runs in an hour. Godleman also had a life on 92 when Michael Burgess put down a straightforward chance at point off Jordan. He celebrated his reprieve by cutting Jordan to point for the boundary that brought up his first century against Sussex.
His fourth-wicket stand with Alex Hughes was worth 85 in 22 overs when Sussex captain Ben Brown summoned leg-spinner Luke Wells as his seventh bowler. Wells duly bowled Godleman with a fizzing leg-break with his second ball as the centurion played a forcing shot off the back foot.
Hughes was troubled early in his innings by the pace and bounce generated by Archer in particular, but settled down to pass 50 for the second time this season. But Derbyshire lost Sean Ervine, who has joined them on loan from Hampshire, when he was run out by Robinson’s direct hit from mid-on and night-watchman Hardus Viljoen, who was bowled by Briggs off the final ball of the day.
Earlier, David Wiese missed out on a hundred as Sussex lost their last three wickets for 40 runs.
Wiese, who began the day on 89, was bowled by Lockie Ferguson aiming to leg after adding four to his overnight score. He faced 136 balls and hit 11 fours.
That left Sussex 404 for 9 after Jofra Archer (14) had been dismissed by Ferguson in the third over of the day when he was caught at point off a leading edge after pulling out of a hook shot. Robinson and Briggs added 31 for the last wicket before Hardus Viljoen yorked Robinson for 15.
Speaking at the close of play, Wiese said: "The new ball is due after three overs in the morning and we’ve seen on the first two days that first up there is a bit of juice in the wicket and some assistance for the seamers. If we can get into their tail and get a lead we can push home our advantage. We were slightly off as a bowling unit but we have the chance to rectify it tomorrow.
"Danny Briggs bowled nicely and Luke Wells seems to have that knack of getting a wicket when we need it. There are some footholds created by their left-handers so our spinners could be important for us in the fourth innings. I think anything around 250 would be tough to chase.
"It was disappointing not to get a hundred but they were vital runs for the team which is the most important thing."