Ryan ten Doeschate smashed a career-record 173 not out as Essex dominated the second day of the day-night County Championship match at Chelmsford.

The Essex captain marked his first game back after serving a two-match suspension for disciplinary issues, by posting the first century by an Essex batsman in the County Championship this season. Ravi Bopara, with whom ten Doeschate shared a record fifth-wicket stand of 294, was the second century-maker, finally departing for 118 shortly before the declaration.

Essex kept Somerset in the field for more than four and a half sweltering sessions, before calling a halt to the carnage at 517 for five.

On a flat, batsman-friendly pitch, only three wickets fell in the day, in contrast to the number of milestones that were passed at regular intervals. At the close, Somerset had seen out the final 42 overs in reducing the deficit by 140 for the loss of two wickets.

The ten Doeschate-Bopara run-fest was the highest partnership for any Essex wicket this season and also their best first-innings total. More significantly, it marked a sea-change in Essex’s batting fortunes, which had been nowhere near the standards of last season’s Championship success.

The stand came to an end after 78 overs when Bopara took a mighty swing at Peter Trego and had his middle stump knocked out of the ground.

The milestones started with the fourth ball of the morning when ten Doeschate pushed Lewis Gregory through extra cover for the boundary that took him to his fifty from 95 balls. It also took Essex to 300. A second four into the same area by ten Doeschate brought up the century partnership. It had taken 33 overs.

Bopara required 146 balls to reach his half-century. It came with four overthrows when Somerset captain Tom Abell shied at the stumps at the non-striker’s end.

Essex racked up 55 runs in the first 10 overs of the day to secure their fourth batting point – their best haul of the season so far – with 13 balls to spare. The milestones kept coming. The 150 partnership took 41 overs, the next fifty another dozen overs.

Ten Doeschate went to his century by lofting Dom Bess for six over long-leg. He had faced 147 balls and also hit 12 fours. His second six, off Bess again over long-off, rang up the 250 partnership. A four through point next ball took ten Doeschate to 150 from 217 balls, and he launched another six to long-off from the ball that followed.

Bopara reached only his second Championship century since July 2014 – the first came a year ago against Warwickshire – working Josh Davey down to third man. It had been painstakingly constructed with 10 fours from 221 balls.

The stand became the highest for the fifth wicket for Essex against Somerset, beating the 275 of Stuart Law and Darren Robinson on the same ground in 1999.

Jamie Overton tried to repeatedly bounce out ten Doeschate, who responded by trying to swat the ball away; he managed to reach one and cut it for four to equal his highest Championship score of 168. He exceeded that following Bopara’s dismissal when he hooked Overton to the boundary.

Chasing 367 to avoid following-on, Steven Davies survived a fairly comfortable chance when set up down legside by Neil Wagner, only for Michael Pepper to spill at leg slip. Davies added 13 runs before he followed another down legside and was caught behind for 41.

Wagner gave the young second-wicket pair, Eddie Byrom and George Bartlett, a real going over with a succession of short-pitched deliveries, one of which left 20-year-old Bartlett on his backside. Both players seemed up to the challenge, hooking and pulling, when not ducking.

Byrom flicked Sam Cook off his legs for his seventh boundary to reach a 98-ball half-century. But he lost his partner to the last ball of the day, bowled by Cook with one that angled in to end an 85-run partnership.