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, 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.

Like his partner, Browne received a let-off on 46 when he slashed at Toby Roland-Jones outside off-stump and Steven Finn dropped a relatively easy chance at third slip. Browne took advantage and reached his fourth Championship fifty in five innings with his sixth four, pushed through the covers.

Cook glided Ryan Higgins to fine leg for the single that took him to three-figures. His century, which included 17 fours, took him 134 balls. That was 16 balls less than Browne required for his half-century, and told the story of the partnership.

When they passed 209, they broke the record Essex first-wicket stand against Middlesex, beating the previous best set by Frederick Fane and Johnny Douglas at Leyton in 1906.

At 233, they had passed the record of Percy Perrin and Charlie McGahey for any wicket against Middlesex, set in 1905 at Lord’s.

Later, at 372, they beat the total for any wicket in an Essex versus Middlesex encounter, which stood to Mike Gatting and Justin Langer at Southgate in 1998.

Browne, who went to the first interval on 97, followed Cook to his ton when he pulled Paul Stirling through deep extra cover for four. It was his 13th boundary and came from 240 balls.

The batsmen were particularly severe when the new-ball was taken. Browne hit Roland-Jones for three boundaries in an over, and Cook straight-drove him for another in the next to pass 150 from 220 balls.

A two to midwicket by Browne off Higgins took the pair beyond 316, which earnt a round of applause from a knowledgeable and appreciative crowd.

The carnage continued and Browne swept Ollie Rayner for his 18th boundary to reach his 150 from 323 balls. With Cook gone, the otherwise circumspect Browne allowed himself the luxury of chipping Dawid Malan over the bowler’s head for six to enter the 190s. A push into the onside brought up Browne’s double-hundred from 368 balls.

Chopra, the substitute replacing the England Lions-bound Tom Westley, followed suit with a six off Rayner over cow corner. Nick Compton might have ended his rampage on 39, but he dropped a diving chance on the midwicket boundary.

Chopra’s fifty arrived with an identical six off Rayner and had taken just 51 balls. He was not finished there.

Browne’s seven-hour 32-minute marathon ended when he hit Rayner into the covers and was caught by Malan. Rayner bore the brunt of Chopra’s onslaught and finished with two for 152 from 29 overs.

The departure of Browne precipitated something of a collapse as Dan Lawrence lasted just five balls before moving away from his stumps to give himself room and being bowled by Higgins.