Simon Harmer returned his best first-class match haul as Essex stunted Hampshire's LV= Insurance County Championship charge in a three-day thriller.
Off-spinner Harmer, who bowled unchanged on day three, claimed 7-161 to go alongside his 8-46 in the first innings to return 15-207.
The visitors, who were only three points behind leaders Surrey ahead of the match, were only 13 runs shy of victory after Felix Organ's 65, and contributions from Ian Holland, Ben Brown, Aneurin Donald, Keith Barker and Kyle Abbott got them unbelievably close to their 299-run target.
Hampshire still have not won at Chelmsford since 2012 and had lost their last three matches on the ground by an innings - by those results, this was progress.
Harmer had only taken 12 Championship wickets this term before this match, with only two coming on placid home wickets. A return to a spicier pitch benefitted him and handed Essex their maiden home win of the year.
But since Harmer arrived in 2017, Essex have only lost three home matches, with the only successful fourth-innings chase coming when Surrey needed just two.
The South African was frustrated initially as Organ and Holland played with a decent tempo to keep eating into the 299-run target. Organ had already smashed Harmer over mid-wicket for three sixes the previous evening, and sailed another two over the dressing room as he found a way to deal with the turn and bounce.
He reached his second half-century of the season with a carved boundary behind point off 67 balls. But Harmer won the battle in the end, Organ bowled going back to the spinner, ending an opening stand worth 97 - the highest of the match.
Hampshire were somewhat miffed as replacement balls meant a steady stream of harder balls, with Essex benefiting from the ball going softer the previous afternoon when Adam Rossington and Harmer were scoring freely.
And it was after a delay discussing the ball situation that wickets began to fall.
James Fuller had been promoted from number nine to number three and scored a slightly better than run-a-ball 18, including another six over mid-wicket, before guiding Aaron Beard to second slip to break the run of 19 straight wickets falling to spin.
Holland had bedded in by facing 95 balls and looked relatively comfortable before turning Harmer to short leg, and Nick Gubbins and James Vince made the fatal decision to go back to Harmer to fall lbw and bowled respectively.
In between the Harmer scalps, Beard picked up his second on his first red-ball appearance for Essex since 2020 as Liam Dawson was adjudged to have edged behind.
Hampshire had lost six wickets for 65 runs but, thanks to Donald's slogging, a 46-run partnership with Ben Brown gave the visitors a sliver of hope again.
However, Harmer had Donald castled while going back to cut, in almost identical fashion to Organ earlier, and Brown leg before while coming around the wicket.
Abbott and Barker gave a nervy feeling to proceedings as they added 41 with very little resistance before Abbott was lbw, giving Beard his third.
Barker and last man Brad Wheal put on 32 as an unlikely victory edged closer but Barker picked out long-on to fall for 42 and give Harmer his best haul.
Comments: Our rules
We want our comments to be a lively and valuable part of our community - a place where readers can debate and engage with the most important local issues. The ability to comment on our stories is a privilege, not a right, however, and that privilege may be withdrawn if it is abused or misused.
Please report any comments that break our rules.
Read the rules here