Ravi Bopara and James Foster both collected long-awaited centuries in a sixth-wicket stand of 229 as Essex kept Warwickshire in the field for more than five sessions at a sweltering Chelmsford.

The pair’s 66-over partnership – a record for an Essex sixth wicket against Warwickshire, beating the 140 by Keith Fletcher and Allan Border at Edgbaston in 1988 – enabled the Division One leaders to declare five overs post-tea, just after the third new ball had been taken, on 541 for nine.

By the close, Warwickshire were 56 for two, still 332 short of their follow-on target as they attempt to avoid a fourth innings defeat in seven Specsavers County Championship matches this summer.

Bopara had gone nearly three years without a championship hundred to his name. By the time he was out just after tea, having batted for eight hours, he was just eight runs off a double-century.

Foster, ousted from wicketkeeping duties for the first four championship games of the season by the return to the county of Adam Wheater, leapt in the air and pumped his fist three times in the direction of the home changing room after posting his first three-figure total for nearly 13 months.

Bopara’s previous century had been completed on July 1, 2014, against Gloucestershire, also at Chelmsford, and he had three times been out in the nineties, twice of 99, in the last 12 months alone. The 32-year-old clipped Jeetan Patel past backward point for the single just before noon that took him to the 27th first-class century of his career. At that point he had been at the crease for 221 balls.

When he went to a tired-looking heave-ho against Patel 158 balls later, playing all around it, he had hit 16 fours and three sixes – two of them straight and long from part-time spinner Andrew Umeed’s only over.

Foster, meanwhile, had not claimed a century since his 113 against Northamptonshire last May, but he outscored Bopara for much of their time together.

He brushed off a nasty blow to the side of his helmet from a Boyd Rankin bouncer by hooking Rikki Clarke for the four that took him to a 159-ball century.

By the time he was caught at wide mid-on by a tumbling Keith Barker for 121, he had faced 182 balls and hit 16 fours and a towering six over long-leg.

After Foster’s departure, Warwickshire claimed three wickets for 32 as the Essex tail joined Bopara in adding quick runs towards the declaration.