Yorkshire 202 and 283 (Ballance 98*, Handscomb 70, Bess 5-80) beat Somerset 224 and 258 (Hose 58, Davies 59, Patterson 3-28) by three runs

Two counties that pressed for the title until the final day of last season's Championship combined to produce a gripping finale at Taunton. It ended with a three-run victory for Yorkshire. They went top of the table, at least for a few hours, while Somerset's fears of relegation are now impossible to ignore.

Yorkshire, in the final, tense moments, had two matchwinners - one easily anticipated, one not. As Ryan Sidebottom began to reverse swing the old ball in the nick of time, Gary Ballance eschewed the second new ball and blocked up the other end with the part-time offspin of Adam Lyth. Lyth not only hung in there, he took the last wicket of Jamie Overton to a catch at midwicket.

Overton, with 12 needed at the start of the over, had seen Sidebottom's swing torment last man Dominic Bess and concluded, fairly enough, that some long handle was needed against Lyth. Immediately, he deposited him into the seats at long-on, stole two leg-byes from the next as Lyth roared for lbw then dug the next ball into midwicket's hands.

As Lyth raced around the outfield, pursued by exultant team-mates, his first-class tally of wickets now stretched to 29, the umpires conferred for a possible bump ball catch before ruling in Yorkshire's favour.

As Somerset resumed on the final morning at 101 for 4, still 161 short of victory, the game had felt 60-40 in Yorkshire's favour. But that might have rested to some extent on reputation. Yorkshire are presumed to be perpetually strong, no matter how many players are missing. Somerset's batting has been at sea all season, talk of another Championship tilt long forgotten.

The reality was somewhat different. Yorkshire were fielding a second-string attack, with apologies to the indefatigable Sidebottom, and their decision to omit Jack Brooks and pick two unseasoned spinners in response to a used Taunton pitch was not justified by events. The surface did not break up as might have been expected, which probably influenced Ballance's reluctance to put the fate of the game in their hands.

Lyth did him a dirty job and did it well. Without him, Yorkshire's loss of four wickets for 10 runs in 8.2 overs on the third afternoon, with Somerset's spinners, Jack Leach and Bess, in the ascendancy, would have been pivotal.

The day began cloudily, but there was little encouragement for bowlers of any type. For Steven Davies and Adam Hose to extend their stand, worth 52 overnight, to 118 in 39 overs was as much as Somerset could have hoped for. Century stands that divide over two days rarely attract much attention, but as surreptitious as this one was, it was immensely valuable.

Hose made a duck in the first innings, but by slashing Matthew Waite to third man, he reached a maiden Championship fifty on debut. His end was a careless one, driving a wide one from Karl Carver to short cover. But of Carver and and his fellow front-line spinner, Azeem Rafiq, little was seen.

Instead, Lyth rewarded the trust shown in him by Ballance by conceding only 45 in 17.3 overs of survival offspin, as well as getting lucky with the vital wicket not just of Jamie Overton but also Davies.

Davies, without a meaningful score all season, remains a long way off his best form but this was at least a plucky response. There was little width for him to show his strength, but he cagily worked his singles. He almost ran himself out when stealing one off Sidebottom, but the bowler's pick-up lacked speed and the throw lacked accuracy.

When he perished against a rank long-hop from Lyth, the ball scuttling through to pin him lbw as he swung lustily to leg, Somerset were 73 short with only four wickets remaining and again the game switched back towards Yorkshire.

So how do you play when you have just been called into England's T20I squad to face South Africa, when Andy Flower thinks well of you, but you have no Championship form to speak of?

Craig Overton faced that challenge. He began by walloping Lyth into the Botham Stand but, on 11, square-cut Carver into the knee of first slip and to safety. Thereafter, he settled down and, in partnership with Lewis Gregory, again gave Somerset hope.

The new ball was still 13 overs away, with 57 needed, when the afternoon session began, but Ballance returned immediately to the old warhorse, Sidebottom. That he would bowl to the end had become inevitable.

He took three in a row, and with every wicket Yorkshire supporters bemoaned the fact that he will retire at the end of the season. With 31 needed, Gregory was caught at short cover. Craig Overton followed caught at the wicket, and as it was his third wipe at Sidebottom within five minutes, it was hard to feel much sympathy. Leach fell lbw, playing across a full, swinging delivery.

Then came Lyth, a victory to sustain Yorkshire on the long journey north and the fleeting thought that, instead of retiring, maybe Sidebottom should try his hand at left-arm spin.