England Test captain Alastair Cook came within 19 runs of a double-century to put Essex on the front foot in their LV= County Championship Division Two match against Derbyshire.
Going into the third day at Chelmsford, the hosts had recovered from a first-innings collapse of 94 all out to put themselves in charge, with Cook at the forefront of the fightback.
His contribution may have been vast but once he had been removed for 181, Derbyshire quickly mopped up the tail with Essex dismissed in their second knock for 425.
But a spate of wickets towards the close of play meant Derbyshire finished the day on 167 for five, still requiring 199 runs for victory.
Starting the morning on 297 for five, Cook and Ben Foakes did not have too much time to build their partnership before the latter was bowled by Mark Footitt for 22, having added just nine to his overnight score.
That bought skipper James Foster to the crease and he played a good supporting hand as Cook continued his march.
But Cook could not turn his stellar effort into a 200 as a leading edge offered a return catch to spinner David Wainwright shortly after lunch.
— Derbyshire CCC (@DerbyshireCCC) April 15, 2014
Once Cook's long stand was over, Derbyshire removed the tail without too much effort as Graham Napier could add just nine before falling caught and bowled to Wes Durston, with England spinner Monty Panesar run out for a duck.
Foster completed a 104-ball half-century with his eighth four but was stranded on 55 when Tymal Mills became Durston's third victim, leaving Essex defending a lead of 365.
Derbyshire's chase started at a frenetic pace as they scored 15 from the opening two overs, with Stephen Moore leading the way.
But the former Lancashire and Worcestershire opener could only reach 32, from 49 balls, before he was caught by Jaik Mickleburgh at midwicket off Panesar.
Wayne Madsen was next in but the Derbyshire captain did not have a telling input on proceedings, caught behind off Mills for just four.
The left-arm paceman picked up his second scalp of the innings six overs later, trapping Billy Godleman lbw for 38 as the visitors continued to lose wickets at all-too-regular intervals.
As Shivnarine Chanderpaul and Chesney Hughes appeared to be guiding their side safely through to stumps, Mills struck once again as he trapped the latter in front for 24 with a little over 10 overs remaining in the day.
There was still time for Greg Smith to have Durston caught down the leg side by Foster, giving the visitors an uphill battle to save the match going into the final day.