Danish Kaneria claimed the first hat-trick of his career but Essex's hopes of celebrating promotion into Division One of the LV County Championship now look slim.
Although they took Derbyshire's last seven wickets for 74, the home side still finished on 474 thanks to 222 from skipper Chris Rogers.
That left Essex needing 325 just to avoid the follow on and by the close they had reached 166 for two thanks to 50 from Matt Walker and Tom Westley's classy 90.
Derbyshire also need to win to have any chance of grabbing second place and Graham Wagg raised their hopes when he reduced the visitors to 14 for two before Walker and Westley dug in.
The home side went into the second day holding all the cards on 368 for three but Essex bowled much better although Derbyshire had banked maximum batting points before they finally took the prized wicket of Rogers.
The Australian opener lofted a catch to deep cover after failing to get over a drive at Graham Napier and departed to a standing ovation.
Rogers had faced 329 balls and hit 31 fours and a six but once he had gone, it looked a different game as Essex worked through the lower order.
David Masters found the edge of John Sadler's defensive bat and he claimed a second bowling point with only four balls to spare when he bowled Wavell Hinds who had been in for 39 overs for 37.
Masters was denied a third victim when James Foster dropped Jamie Pipe diving to his right but the spotlight quickly switched to Kaneria.
Greg Smith became the Pakistani leg spinner's 800th first-class victim when he was bowled behind his legs for six and Wagg fell lbw as he tried to sweep his first ball.
Kaneria was mobbed by his team mates when Richard Kettleborough raised the finger after Jon Clare was pinned leg before as he pushed half forward.
It was the first hat-trick by an Essex player since Andre Adams achieved the feat against Somerset at Taunton in 2005 but Derbyshire were still in a strong position.
They batted on after lunch, adding another 35 before Chris Wright took his fourth wicket when Pipe skied a big drive to cover and Wagg then rocked Essex in a splendid opening burst.
He found pace and movement to have John Maunders pouched by Rogers at second slip for five and then got the big wicket of Alastair Cook when the England opener gloved a lifter.
Derbyshire now had their tails up but Walker and Westley showed sound judgement and character to keep them at bay until bad light ended play four overs early with Essex still trailing by 308 runs.
Derbyshire can also still win promotion but they cannot afford Northants to win, and the midlanders look on course to record victory in their final game.






Post to del.icio.us
