James Foster struck his first century of the season to put Essex in charge on a rain-affected third day against Leicestershire at Grace Road.
The Essex captain and wicket-keeper hit a masterful 143 to lead his side to a total of 356 and a first-innings lead of 54.
And, despite the loss of 35 overs in the day, Essex were looking in an even better position at the close, with Leicestershire on 91-4 in their second innings, leading by only 37 runs.
Resuming on 196-6, Foster set the tone in the first over of the day when he took 12 runs off Ollie Freckingham to race from his overnight 45 to 57.
He continued in the same fashion and posted his century with a neat late cut to third man earning him his 14th four in addition to the six off Jigan Naik.
Seventh-wicket partner Graham Napier made 52 off 80 balls with seven fours, before falling lbw to Freckingham to end a stand of 114.
But Foster skilfully marshalled the tail through another 11 overs until he was ninth man out at 355, skying a catch to mid-on off Matthew Hoggard, who claimed 6-66 in 29 overs.
The Foxes were soon in trouble second time around, losing Niall O'Brien who edged David Masters to Foster while Reece Topley had Greg Smith lbw.
Joe Burns and Ned Eckersley staged a brief recovery putting on 46, until Ryan ten Doeschate turned things round again by dismissing both batsmen in the space of six overs.
Shiv Thakor and Matt Boyce added five more runs before bad light brought an end to play with eight overs still to go.