A stunning five-wicket haul from Ryan ten Doeschate sealed an unlikely victory for Essex over Hampshire on the final day of their LV County Championship fixture at Chelmsford.
Chasing 248 to win the Division One clash, the visitors were favourites when they required a further 78 from the final 11 overs with six wickets still in hand.
However ten Doeschate had other ideas, reducing the Hawks from 170 for four to 185 for nine, including removing the dangerous Nic Pothas for 39.
Hampshire - who had earlier seen openers Michael Carberry and Jimmy Adams put on 71 - looked set to escape with a draw until the Dutchman had David Griffths caught at leg slip with the fifth ball of the final over.
Ten Doeschate's five for 13 capped a fine all-round performance after he had earlier hit an unbeaten 66, which included 10 fours and a six, to hold the home side's second innings together.
Essex lost Tom Westley (69) before he had added to his overnight total as they were bowled out for 256, paceman Kabir Ali claiming five for 33.
Essex and Hampshire's clash appears to be heading for a draw after the runs continued to flow on a friendly pitch on day three at Chelmsford.
Resuming on an overnight 234 for five, Hampshire added a further 120 runs to finish on 354, a first innings lead of nine runs.
Nearly half their total came from Jimmy Adams who, after resuming on 113, went on to make 169 before he was ninth man out, bowled by David Masters who returned figures of 4-67.
In reply, the home county lost Billy Godleman and John Maunders in the first couple of overs before the arrears were cleared.
But youngster Tom Westley then played the leading role with captain Mark Pettini to start a recovery which ended with Essex reaching the close on 131 for four, with Westley set to resume on 69 on the final day.
Jimmy Adams' patient century left the LV County Championship match between Hampshire and Essex evenly poised after day two at Chelmsford.
Opening batsman Adams reached stumps on 113 not out, his eighth first-class hundred, as Hampshire closed on 234-5 in their first innings, 111 runs behind.
The left-hander hit 15 fours in his 245-ball innings and shared a 105-run stand with Neil McKenzie (39) for the third wicket as Essex's attack shared the wickets around.
The home side had progressed their first innings from 325-7 to 345 all out at the start of the day.
Seamer David Griffiths (5-85) claimed two of the last three wickets to finish with a maiden five-wicket haul.
Billy Godleman fell just short of a century on his Essex debut as the hosts closed day one against Hampshire at Chelmsford on 323-7.
Opener Godleman, who made the short move from Middlesex in the winter months, made 92 after his side had been asked to bat first.
The left-hander shared stands of 68 with opening partner Jon Maunders (33) and 86 with Matt Walker, who made a patient 57 from 178 deliveries.
Left-arm spinner (3-61) Dan Briggs eventually dismissed Godleman eight runs short of three figures, though James Foster continued to pile on the runs.
The wicketkeeper-batsman hit 18 fours to make 88 from 118 balls before falling to David Griffiths shortly before the close.
The same bowler removed Ryan ten Doeschate (23) late on to further check Essex's progress. Kabir Ali sent down 20 wicketless overs on his maiden appearance for Hampshire.