LONDON (Reuters) - County champions Surrey could not make it a blemish-free season but their audacious bid for a record-breaking victory against Essex ensured a magnificent finale at the Oval.
Shot out for a paltry 67 on Monday, Surrey looked down and out after conceding a mammoth first innings lead of 410 runs to Essex, who declared their first innings on 477 for eight.
Rory Burns's team rediscovered their stomach for fight in the second innings, though, when centuries from Jason Roy and Ollie Pope powered them to 541.
Their bowlers, led by former South Africa spearhead Morne Morkel, then decided to complement that effort.
Chasing 132 for what appeared an easy win, Essex suffered a spectacular top and middle order collapse to find themselves reeling at 97-7 - rekindling Surrey's hopes of ending the season without a loss.
Essex were still two runs away from their target when Morkel first hit Matt Quinn on the rear of his helmet with a bouncer and then arm with another short one, but the number 11 batsman somehow survived that over.
It was Ryan Ten Doeschate who snuffed out Surrey's hopes of overturning the biggest deficit to win a first class match with an unbeaten 53, flicking Jade Dernbach for four to lead Essex to a nervy one-wicket victory.
"It was an unbelievable atmosphere out there, and that's the fight we have shown all season," Burns told the BBC.
"I'm so pleased with the character we've shown here - it still feels like we've ended on a high after that first innings, it's an unbelievable finish."
(Reporting by Amlan Chakraborty in New Delhi; editing by Nick Mulvenney)