Somerset were knocked off the top of the Specsavers County Championship after an innings-and-73-run defeat against Yorkshire, as five wickets from Simon Harmer helped give title rivals Essex victory over Warwickshire.

The visitors, following on in reply to 520, started the final day at Headingley on 159 for four – but lost three wickets inside the opening 45 minutes.

Nightwatchman Tim Groenewald was soon back in the pavilion, before Tom Banton (63) and then Dom Bess were both dismissed by Yorkshire captain Steve Patterson, who collected his 400th first-class wicket.

Somerset were eventually bowled out at 251 before lunch, Jamie Overton making 23 and Craig Overton 21, which secured only one point from the match. South African Test spinner Keshav Maharaj finished with a 10-wicket haul.

Yorkshire’s victory was worth 22 points, which just about kept them in the title race with four games still to play.

At Chelmsford, Harmer’s seventh five-wicket haul of the season helped Essex secure a 187-run victory over Warwickshire.

The South African off-spinner had done the damage in the morning session when he took four wickets in 20 balls.

Warwickshire had been set 401 to win. Despite a lively seventh-wicket partnership between Michael Burgess, who was eventually out for 64, and Henry Brookes (32) which put on 51 in eight overs, it proved a tall order. Harmer finished with six for 75 from the second innings.

Essex’s seventh win in eight games – and six out of six at Chelmsford – carried them above Somerset by four points, with a potential winner-takes-all showdown at Taunton in the final game to come.

Joe Denly hit a rapid 29 off 22 balls in a thrilling finale as Kent’s match against Hampshire at the Ageas Bowl ended as a draw.

Kent had been left facing a victory target of 153 from 17 overs. However, after Sean Dickson, Alex Blake and Daniel Bell-Drummond had all departed, the visitors gave up the chase and shook hands after 50 balls – still requiring 96 runs.

Earlier, seventh-wicket pair Aneurin Donald (43) and Keith Barker (37 not out) provided an important afternoon recovery for Hampshire, who had lost three wickets in 25 balls during the morning session.

Ian Holland (69) and Rilee Rossouw (66) both made half-centuries before the home side were 298 all out, giving Kent a tantalising victory shot.

Glamorgan suffered their first Division Two defeat of the season as Middlesex wrapped up a 256-run victory at Cardiff during the final morning.

The hosts resumed at 171 for six, chasing an improbable 556 for victory.

Opener Charlie Hemphrey (72) and Graham Wagg (40) showed some initial resistance while Marchant De Lange went about a rapid unbeaten 45, with three sixes and five boundaries from 28 balls, as Glamorgan were all out for 299. Toby Roland-Jones finished with match figures of nine for 113.

Durham extended their unbeaten run to six matches after defeating Worcestershire by 109 runs at Emirates Riverside to stay in the promotion hunt.

Chris Rushworth delivered his third five-wicket haul of the campaign to finish with match figures of 10 for 67.

Sixth-wicket pair Ben Cox (62) and Ed Barnard (43) did offer some resistance, while Brett D’Oliveira was unbeaten at 45 as Worcestershire – who has resumed day four at 31 for three – were eventually all out for 242.

Northamptonshire are a point ahead of Durham in third place after wrapping up a 72-run victory over Derbyshire at Chesterfield before lunch on day three.

Derbyshire’s prospects of reaching a target of 319 on a pitch which was marked as below average always looked slim when they went out needing another 164 with five wickets left.

Tom Lace top scored with 41, while Fynn Hudson-Prentice finished unbeaten on 26 as the home side were all out for 246. Luke Proctor finished with four for 26 from his nine overs.

On day two at Cheltenham, Chris Dent and Tom Smith staged an unlikely third-wicket stand of 195 in 66.1 overs as Gloucestershire forged a potentially-decisive first-innings lead against bottom-of-the-table Leicestershire.

Captain Dent made 125 and Smith a career-best 84 as the home side reached the close on 275 for six in reply to Leicestershire’s 252 all out.

Earlier, Chris Wright had taken three wickets in as many overs with the second new ball to help redress the balance.