Somerset 102 (Batty 7-32) and 301 for 9 (Trescothick 56, Allenby 56, Meaker 4-79) beat Surrey 264 (Leach 4-34) and 138 (Leach 4-63, J Overton 4-18) by one wicket
Summers turn on days like this, when events unfold quickly and heroes emerge without much recent evidence they will. So it was for Somerset on a bewitching day in Taunton, as Nos. 10 and 11, Jack Leach and Tim Groenewald, eked out the 31 runs they required for an outright victory that felt close to impossible 24 hours ago.
Groenwald cover drove the winning runs after he and Leach had nervelessly played out 11 dot balls with just one required - the composure as memorable as the celebrations that followed the final stroke. A previously turgid season marked by six draws was momentarily forgotten, even if the team's failings over the previous two days are some way from being remedied.
Nonetheless, the new captain Chris Rogers now has something to hang his hat on, just as the likes of Jamie Overton, Peter Trego, Jim Allenby and not least Leach and Groenewald can look ahead to the rest of the season with new-found confidence in their ability to find a way to win. Rogers had previously helped take Middlesex on a journey from mediocrity to confidence, and this result will help Somerset no end.
The fine margin was epitomised by where this leaves bottom-of-the-table Surrey, under pressure and cursing their misfortune. Rory Burns will wonder many a long year about how he came to drop Leach at slip off Batty when the score stood at 276 for 9. The coach Michael Di Venuto left a successful environment as Australia's batting coach to mentor Surrey. He now finds himself having to find a way to pick 11 jaws up from the dressing room floor.
A hectic second day at Taunton had seen the hosts shot out for 102 by Gareth Batty, the beneficiary of a handful of harebrained shots but also a pitch that was well grassed while also spin friendly on a good length - clearly there had been little appetite here for a seventh stalemate of the season.
Despite Batty's 9.2 overs of havoc, Somerset had fought their way back into it with regular second-innings wickets, and the diligent left-arm spin of Leach was rewarded third ball of the morning with a front edge from Ben Foakes that lobbed gently to Rogers at cover.
Batty and Zafar Ansari frustrated for a time, before Rogers called on Overton for the kind of zippy spell he can occasionally conjure. A fast full toss was through Batty before his bat came down, and Mathew Pillans was yorked by something even swifter three balls later. Ansari helped scrape another 21 for the last wicket before Overton found his edge, leaving a target close enough to tantalise if Somerset could forget the events of day two.
Initially they did so grandly, as the senior pros Marcus Trescothick and Rogers cruised into the afternoon, the latter offering a half chance through the slips when Stuart Meaker got one to climb. He appeared to be having trouble finding the cut strip in the 24th over of the innings, but a pair of wides were followed by a delivery closer to off stump that Trescothick touched behind. Then James Hildreth's late-blooming England ambitions were momentarily scotched by a sharp delivery that drew his edge for a second-ball duck, and suddenly the game had swung.
Never totally at ease, Rogers was adjudged to have been struck in front of the off stump by Tom Curran, and at 127 for 4 Surrey were in the ascendant. However Batty was not gaining the turn of day two, and a previously out-of-touch Allenby found his feet in the company of the muscle-bound Trego. Together they brought the target down steadily, and were so comfortable that it was a surprise when Batty found a way through Trego's forward stroke to win an lbw verdict.
From there it appeared as though Surrey were just a fraction too far ahead for a nervy lower order, as Craig Overton, Allenby, Ryan Davies and Jamie Overton all fell. Jamie Overton's exit came through a stunning catch from Foakes, beautifully balanced behind the stumps to dive for an inside edge that would have been four most other days.
That left Leach and Groenwald with quite a few still to get in the pristine early evening but, despite a few moments of nerves, they moved forward sensibly against bowlers and fielders showing the strain of the scoreboard if not outright fatigue. Somerset needed three to win when Batty went up raucously for an lbw appeal against Leach, but its denial was Surrey's last chink of light.
Daniel Brettig is an assistant editor at ESPNcricinfo. @danbrettig