Alastair Cook and Nick Browne rewrote a plethora of records in a first-wicket stand of 373 that thoroughly demoralised reigning champions Middlesex on the third day of the day-night Specsavers County Championship match at Chelmsford.

Cook contributed 193 and Browne 221, before Essex declared on 542 for three, setting Middlesex 296 just to make the Division One leaders bat again.

Openers Nick Gubbins and Nick Compton survived a torrid 13 overs under the floodlights against Mohammad Amir and Jamie Porter, but Middlesex need to bat resolutely throughout the final day to avoid a second defeat in three games.

It was Cook’s third century of the season, and was just two runs short of his highest score in a Championship career that began 14 years ago. After eight Championship outings this summer, Cook now heads off on England duty and the first Test against South Africa at Lord’s next Thursday. He goes with 667 first-class runs to his name at an average of 66.70.

Meanwhile, the last three times Browne has gone past three-figures he has more than doubled his tally. This was his first century of a season that started slowly, but which is now moving into overdrive.

The partnership was finally ended after six and a half hours, just before tea, when Cook pushed forward to Ollie Rayner and was snaffled by Stevie Eskinazi at slip. Cook had faced 280 balls and hit 26 fours. And as daylight turned to twilight Varun Chopra set up Essex’s declaration with a big-hitting 100 not out from 75 balls, which included six sixes, all off Rayner.

At various points on a cold, grey day, the pair ticked off records before eclipsing the all-time best for an Essex opening stand: the 316 set by Graham Gooch and Paul Prichard against Kent on the same ground in 1994.

Cook, who was dropped on 48 on Monday evening, survived another scare even before play started when James Foster parried the ball into his face during catching practice.

The England opener fell to his knees, and stayed there for several minutes while medical staff checked his jaw. However, he was back in the middle 35 minutes later to resume his innings as if nothing had happened. Records apart, it was a partnership of exemplary batsmanship from the Essex openers. The ball sped to the boundary so frequently, they became almost routine.