Analysis:In the early hours of yesterday, Diane James was triumphant as she stood on the stage in the Fleming Park count centre as the results of the Eastleigh byelection in Hampshire were announced. She had not won, however.

James, the UK Independence Party candidate, had come second, nearly 2,000 votes behind the Liberal Democrats’ Michael Thornton. For now, however, second is good enough.

For Conservative prime minister David Cameron, some soul searching is in order: he tried in January to shore up the right of his party with a pledge to hold a referendum on the UK’s European Union membership.

However, it seems to have done little to ease his troubles or to take the wind from the sails of Ukip, which wants the UK to quit the EU, plain and simple.

So, he must decide if he should tack even further to the right, standing, as EU Council president Herman Van Rompuy put it in London on Thursday, even “closer to the door with his coat on” as he seeks changes in the EU.

Many in his ranks want him to do so, though Cameron wants to keep Britain in the union but with more acceptable rules and conditions – a tall order when such an agreement has to be reached with 26 other EU capitals.

The Conservatives chose a Ukip-style candidate to run in Eastleigh in Maria Hutchings, though it then did everything possible to keep her off the airwaves once she had espoused views that most involved already knew she held.

Indeed, the Tories demeaned themselves in the eyes of the Hampshire voters by at one stage issuing party literature, complete with Hutchings’s picture, in the Ukip colours.

Everyone involved will draw lessons from Eastleigh – the Conservatives, the Liberal Democrats, Labour and Ukip – though, if history is anything to go by, many of them will be the wrong ones.

Buoyed by the result, the Lib Dems believe that their “fortress” Commons seats – buttressed by years of diligent, often vicious campaigning on the ground – can withstand the gale to come in 2015.

Eastleigh is special

Eastleigh, however, is special, even in the Lib Dems’ lexicon: the party holds 40 of the 44 seats on the local borough council. The result calms nerves after a dreadful couple of weeks in the wake of unproven allegations of misconduct towards female candidates made against the party’s former chief executive Chris Rennard, which he denies.

Defeat in Eastleigh could easily have resulted in a leadership crisis within the party, if not a challenge — particularly at next month’s spring conference, for which a motion is down urging changes to election rules for the top job. Now, party leader Nick Clegg can go before the conference to argue coalition does not automatically guarantee doom for the smaller party.

For Ukip leader Nigel Farage, Eastleigh offers sight of the Promised Land: seats in the House of Commons. His party, he said, was no longer a receptacle just for protest votes.

On this, he is right: the anti-politician sentiment sweeping Europe, exemplified by the rise of Beppe Grillo in Italy, is there to be exploited in the UK – even if it is more difficult to do so because of its first-past-the-post voting system.

However, James, who is articulate, disciplined, moderate in language if not necessarily in view, is not a typical Ukip l candidate — many of whom border upon the flaky.

Equally, the more Ukip looks like it could breach Westminster’s walls the more attention will be paid to the party’s manifesto, which pledges EU withdrawal, higher defence spending, tax cuts and bars on immigration.

Juvenile rhetoric

Much of the rhetoric is juvenile in its simplicity, though that does not necessarily mean it will not find an echo with voters tired of years of austerity – which does not match the Irish experience but remains a burden.

If Eastleigh was a fluke, the Conservatives could put it down to midterm blues. However, it is not: the contest displayed the remarkable weaknesses that exist in the party’s roots in constituencies.

It was caught on the hop by the Lib Dems’ decision to call the byelection quickly, forced by the decision of former cabinet minister Chris Huhne to plead guilty to perverting the course of justice. That plea was entered less than a month ago. The decision to go quickly was not lacking in courage, since Huhne’s disgrace could have poisoned the Lib Dems’ campaign from the off.

However, it did not. Voters in Eastleigh quickly forgot Huhne, while the Conservatives did not have time to exploit the advantages that a well-financed campaign could offer. The argument put forward by some Conservatives that Eastleigh was a seat that “had to be won” was nonsensical: parties in government may hold seats in byelection battles but they very rarely win them.

Throughout the parliament, the Conservatives have been riven with division and indiscipline, which will undoubtedly worsen in the aftermath of the Eastleigh result. Such fissures can be fatal to a party’s electability, a fact that Conservative backbenchers – no matter how experienced or sensible – seem intent on forgetting.

Tribal battles

Ukip, on the other hand, does not have to win to hurt the Conservatives. Of the 650 Commons battles fought, only 150 or so matter. The rest are so tribal that a performing bear wearing the right party colours could triumph.

In 2015, Cameron must take between 15 and 20 seats from the Liberal Democrats if he is to have a chance of winning a Commons majority, before he ever gets around to causing damage to Labour’s numbers. His economic strategy is in trouble and his No 10 operation is often chaotic, while issues previously neutralised, such as the National Health Service, have once again become toxic for the Conservatives. Even more importantly, history is against him.

Support for the two main parties combined has fallen consistently in every election since 1951 – a statistic rapidly attaining the status of a law. Eastleigh or no Eastleigh, Cameron’s task is now a gargantuan one.

We reserve the right to remove any content at any time from this Community, including without limitation if it violates the Community Standards. We ask that you report content that you in good faith believe violates the above rules by clicking the Flag link next to the offending comment or by filling out this form. New comments are only accepted for 3 days from the date of publication.