Almost half, 43%, of UKIP voters said they would probably vote the same way in 2015 - with 10% saying they would back the Tories and 34% saying they were not sure.

Only 43% of Lib Dem supporters said they would stick with them in 2015, with 13% going to Labour and 7% to the Tories, according to his survey of 760 voters.

In his victory speech, Mr Thornton said his victory proved those who had "written off" the Lib Dems were wrong.

"Those who say the Liberal Democrats won't win again, those who are so keen to do us down, that the Liberal Democrats can do it - we have done it and we will do it again," he said.

Lib Dem president Tim Farron warned there were 20-30 Tory seats that his party might feel it could snatch in 2015.

"Defeat by a single vote would have been unspeakable catastrophe and a win by a single vote would have been unspeakable triumph, so this is unspeakable triumph and it means everything to the Liberal Democrats," he said.

"The narrative that we are written off and we can't win anything and we are going down the plughole in 2015 is now, I think, completely confounded - there's a lot of people with egg on their faces this morning.

"The morale and energy boost it will give Lib Dems up and down the country is just priceless."

Ms James called her second place "a humungous political shock" that represented a "seismic shift" in British politics, while Mrs Hutchings appeared to be tearful as she thanked opponents for a "clean campaign".

"The Conservatives failed here because traditional Tory voters look at Cameron and they ask themselves 'Is he a Conservative?' and they conclude 'No, he's not'," he said.

"He's talking about gay marriage, wind turbines, unlimited immigration from India. He wants Turkey to join the European Union. The Conservatives' problems are not because of UKIP, it's because of their leader."

Eastleigh is on a Tory target list of 20 Lib Dem-held seats considered crucial to win if Mr Cameron is to win outright at the next general election.

Senior Tory backbencher David Davis had already warned the Prime Minister that third place in the seat would represent a "crisis" for the party.

Conservative Party chairman Grant Shapps tried to play down the significance of the result, saying: "Governments in mid-term regardless get a drubbing. Let's wait until the general election."

Education Secretary Michael Gove said he was "deeply disappointed" but insisted the Tories must not change track on the economy or shift to the right.

However, Tory MP Eleanor Laing said: "Ordinary Conservative voters don't feel that this Government is in tune with them, with their hopes and fears."

Labour leader Ed Miliband called it a "disastrous night for the Conservatives and David Cameron" but also admitted he would have preferred to win more votes.

"It convinces me that we need to redouble our efforts to reach out to every part of the country, including areas where Labour hasn't traditionally been strong," he said.

Calculations by the Press Association suggest Labour would have a majority of 60 if the vote share changes were repeated nationally at a general election.