Labour's Rachel Rogers and Liberal Democrat Andy Canning were eliminated in the first round.

BBC Radio Solent's Tristan Pascoe, who was at the count, said the Tories left the building before the final result from the second count had been declared.

He said they had already stated that they would refuse to share the platform with Mr Underhill when final declaration took place citing "negative campaigning".

Tory candidate Nick King later told the BBC: "I wish Martin all the best.

"When it became clear he had won, I wanted to thank my team for their hard work in the face of a very negative campaign, so I took them to the pub so Martin could enjoy his victory in peace."

'It got bloody'

After winning Mr Underhill thanked the public for voting for him, but blamed the government for the low turnout.

Only 96,149 valid ballots were cast in Dorset, out of 588,436 registered voters - a 16.3% turnout.

"The blame lies with the government," he said.

"The government organised a bad campaign and educated the public badly."

Analysis

By Tristan PascoePolitical reporter, BBC South

This has been a very bitter and divisive campaign in what is traditionally solid Conservative territory - with Conservative Nick King thought to be a shoo-in for the role.

Following the results of the first round it emerged Martyn Underhill was the clear favourite.

As the only independent candidate he clearly gained from some fairly strong anti-political sentiment among voters, with his main campaign theme "keep politics out of policing".

The Conservatives boycotted the official declaration of the result, refusing to share a platform with Mr Underhill because of what one senior party member told me were "lies, smears and untruths" during the campaign, and Tory members left the building with three areas yet to be declared.

Mr Underhill will not be guaranteed an easy ride now he's been elected. The new crime panel which will hold the PCC to account is to be chaired by Angus Campbell, leader of Dorset County Council who himself failed to win the Conservative party nomination for PCC in Dorset.

He said it was a "fair point" that he may only have won the vote based on the fact the public did not want the election to be political.

"I won every single area which clearly displays people do not want politics involved," he said.

During his winner's speech, Mr Underhill said the race saw him going "head to head" with Mr King.

"It got bloody and we now we need to heal, because I am here to represent everyone in Dorset regardless of their party preference."

He said his "number one" priority was to hire a chief constable "with my vision".

"There's a lot to do in the first 100 days."

Mr Underhill moved to Dorset after retiring from Sussex Police in 2009 and went on to campaign on issues surrounding safeguarding children, including Sarah's Law which was introduced in Dorset in 2010.

He has vowed to make tackling anti-social behaviour, reducing marine and rural crime and putting victims first priorities.

Ms Rogers, the Labour candidate, said she was really pleased to come third.

"It is a significantly better result than I ever expected - a victory for the Labour Party in Dorset," she said.

But she also criticised the election, saying the government deciding not to fund a mailshot to households had "penalised voters".

"Uninformed voting is not democratic," she said.

"It wasn't a shock result but it may be a shock as to how much he won by," said Mr Canning of the appointment of Mr Underhill to the role.

"To be so decisively ahead across the whole of Dorset illustrates the depth of disillusionment with party politics."

The new PCCs, which replace police authorities, will set spending plans and have the power to "hire and fire" chief constables.

Mr Underhill will oversee policing in the county of more than 700,000 people and a budget which was set at £117m for 2012-13 - a reduction of about £3m compared to the 2011-12 figure of £120m. Further cuts are expected up until 2015.

Chief Constable of Dorset Police Debbie Simpson said: "On behalf of the force I would like to offer our warmest congratulations to Mr Underhill.

"I look forward to working with him when he takes office on 22 November, 2012."