Yorkshire 253 (Lees 83, Leaning 57*, Trego 4-69) and 365 (Root 97, Ballance 69, Lyth 51, Trego 7-84) drew with Somerset 437 (Compton 156, Abell 75, Trescothick 66, Patterson 4-54, Rashid 4-116) and 151 for 9 (Brooks 3-46)

Yorkshire played like true champions against Somerset at Headingley to take their final LV= County Championship match to the final ball for a draw.

The visitors' last pair of Jamie Overton and Alfonso Thomas were left clinging on desperately after they had earlier appeared to be in with a great chance of winning.

The crowd stayed on after the match to salute the Yorkshire players and a big cheer went up for Andrew Gale when he led his side out on to the field. The Championship Trophy was re-presented to them by Yorkshire president Dickie Bird and received by Gale, after which his whole squad treated the fans to a jig of joy before running round the field with the Trophy.

Yorkshire's delighted director of cricket, Martyn Moxon, said: "I think today's performance epitomises our spirit and shows why we are the Champions. To put in such a massive effort with tired bowlers draining every ounce of effort was an amazing end to a fantastic season.

"We have a squad which is not aiming to be just one-day wonders but wants to go on repeating this success and I think that it is a squad which can only get better.

"The last few weeks have not been easy for Andrew Gale but I think he has been outstanding as captain and all the lads in the team have played their part. Jason Gillespie is also fantastic for us because first and foremost he is a winner.

"I have got close to it a couple of times but to win the Championship is really special for me and even though I have played for England this is one of the highlights of my career.''

Set 182 to win off 44 overs, Somerset cantered to 62 for 2 but then collapsed to 151 for 9. Somerset embarked on their chase following an early tea and it was Yorkshire who drew first blood as Johann Myburgh cut Ryan Sidebottom to backward point where he was brilliantly caught by Rich Pyrah flinging himself to his left.

Marcus Trescothick attacked strongly while Nick Compton was almost static early on but the tempo increased with the arrival into the attack of Adil Rashid, who conceded 15 in his first over - including two fours through midwicket to Compton and one to Trescothick.

Having given away 24 from 10 balls, Rashid atoned by sending back Trescothick whose slog-sweep towards the midwicket boundary was held by substitute fielder, Jonathan Tattersall.

Then Jack Brooks took over from Rashid and Compton was bowled playing round his third delivery to leave Somerset on 74 for 3 but suddenly the visitors were in disarray on 83 for 6 as three wickets went down in four balls for no runs.

Craig Kieswetter was lbw to Steven Patterson and consecutive deliveries from Brooks saw Hildreth run out by Jonny Bairstow dashing up to the stumps and Somerset's bowling hero, Peter Trego, bowled neck and crop first ball.

It was now left to Tom Abell, batting with Myburgh as a runner after being injured in the field, and Tim Groenewald to try to shore things up for Somerset, but seven overs later Groenewald was caught behind off Sidebottom to increase the tension again.

Brooks came back at the Kirkstall Lane end and his fifth ball was flicked by Abell into the hands of Rashid at square leg to give the paceman his 68th Championship wicket of the season, the most by a Yorkshire bowler since two divisions began in 2000 and beating Steve Kirby's haul in 2003.

Last man, Alfonso Thomas, also batting with a runner because of a back injury which allowed him to bowl only five overs, had 37 balls to survive along with Jamie Overton and they stoically managed it amid the lengthening shadows.

Bad light caused the start of the final day to be delayed by two overs but when Yorkshire resumed on 148 for two, still 36 adrift, Gary Ballance and Joe Root showed positive intent from the off, but on 23 Root survived a sharp chance to Hildreth diving low to his left at slip.

Ballance, batting more fluently than the previous evening, moved to 69 from 128 deliveries with seven fours before he leaned into a full ball from Trego and was lbw to leave Yorkshire on 178 for 3 with still plenty to do.

While Root continued to pick up runs steadily, Bairstow put his full range of shots on view, driving Groenewald through the covers and mid-off for boundaries and lofting left-arm spinner Jack Leach's first ball over mid-off for four.

The pressure was easing on Yorkshire as the century stand for the fourth wicket reached from 96 balls but it ended on 110 when Bairstow departed for 49 off 46 deliveries with 10 fours, helping a leg-side long hop from Overton into Kieswetter's gloves.

Yorkshire were 290 for 4 at lunch and the second ball after the interval from Leach was smacked into Abell's right shin at short leg and he was forced to hobble off after lengthy treatment.

Root seemed set for his first century of the season for Yorkshire, having been available for only four matches, but in searching for the boundary that would have taken him into three figures he chopped Leach into his stumps, his 97 coming off 128 balls with 13 fours and a six.

Now it was Trego, who had already picked up three of the first five wickets to fall, who ploughed his way through most of the remainder of the batting to give Somerset a chance of victory.

Rashid pushed defensively to give Kieswetter an easy catch, Jack Leaning injured his hand in gloving a sharply rising ball to Hildreth and Patterson was bowled middle stump through the gate.

Leach intervened to have Pyrah stumped charging down the pitch before Trego wrapped things up with Sidebottom's wicket to give him career-best figures of 7 for 84, overtaking his 6 for 59 for Middlesex against Nottinghamshire at Trent Bridge in 2005.