Thursday's by-election result in Eastleigh was a mixture of the expected and surprises, as the Liberal Democrats hung onto the seat whilst UKIP appeared out of nowhere to push the Conservatives into third place. My prediction of tactical voting in favour of the Conservatives was wrong, as was the one about Miliband having cause to rejoice, though I believe I made the right call on the result being a disappointment for Cameron and a relief for Clegg.[note Eastleigh by-election: Party leader hopes]

Victory for Farage

Nigel Farage was in a jovial mood on Friday - second place for the UKIP candidate and less than two thousand votes away from taking the seat. Although coming close to victory in a by-election is no guarantee of success in the 2015 general election, Farage will tell everyone that UKIP is en-route to representation at Westminister,[note Eastleigh by election: UKIP's first MP will come, says Farage] and enough people may believe him for it to become a self-fulling prophecy.

A sigh of relief for Clegg

No doubt Nick Clegg sighed with relief when he saw the final voting tally, although describing the result as a 'stunning victory'[note Eastleigh by-election: Lib Dems hold on despite UKIP surge] is putting a positive spin on things - 'holding on by the skin of our teeth' would be more accurate. The Lib Dem share of the vote collapsed by over 14 percentage points, to a level not seen since 1997. Various reasons have been suggested for the swing from the Lib Dems and the Conservatives to UKIP, from dissatisfaction with the Coalition's austerity policy to the twin Lib Dem scandals of Chris Huhne and Lord Rennard - although Huhne's fall from grace was nothing to do with the party, and Rennard has strongly denied all the allegations made against him. Fortunately the huge influx of activists in the weeks running up to the by-election seems to have paid off on this occasion, but the party needs to up its game before the next general election.

Dark times for Cameron

No matter how the votes landed, anything other than a Conservative victory was bad news for Cameron. Second place would have acceptable, although some backbenchers would have grumbled about any result other than a sweeping victory - and even then they would claim that this was proof that moving further to the right is the direction which Cameron should be taking the party.

The only consolation for Cameron is that UKIP failed to take the seat, albeit only by a fairly small margin. Such a result would have been truly disastrous for his standing within the party. As things stand, Cameron has his second favourite candidate in place - assuming he would prefer a Lib Dem over any party bar the Conservatives - and may be able to brush off this defeat as mid-term blues. In private, he can also blame Maria Hutchings, the Conservative candidate, who failed abysmally to connect with the electorate.

A bad week for Miliband

Even before the by-election, Miliband was making a hash of things with a poor performance in Prime Ministers' Questions. After Cameron used several quotes from the New Statesman which criticised Miliband's leadership (and Ed Balls),[note For the good of himself, his family and the party, it’s time for Ed Balls to fall on his sword] the Labour leader responded with: 'the Prime Minister is scraping the barrel by quoting [the New Statesman]'.[note HC Deb, 27 February 2013, c305 (also on TheyWorkForYou)] Cue an intake of breath from the Labour backbenches and roars of laughter from the Conservatives. After a call to order by the Speaker, Miliband tried to get in a soundbite about a 'downgraded Government, a downgraded Chancellor and a downgraded Prime Minister'.[note Ibid.] Cameron spotted the open goal though, and hit the back of the net when he pointed out that the New Statesman was the only newspaper to have endorsed Miliband in the Labour leadership contest.

In terms of the Eastleigh result, the Labour turnout was appalling. Whilst the fall in the absolute number of votes could be put down to a lower turnout,[note 2013 turnout was 52.8%, down more than 16 percentage points on 2010 turnout of 69.3%] the negligible 20 basis points increase of the vote share was inexcusable. Part of this was down to the unfortunate choice of John O'Farrell as the Labour candidate, a comedian who is better left writing jokes for other politicians than attempting to appeal directly to the electorate.[note BBC News has an interesting article about comedians who stand for election: Can comedians ever be taken seriously?] However, even a poor candidate should have been able to capitalise on a backlash against the two parties of government. Voters seem to be unwilling to trust Labour again - especially when an alternative protest vote is on offer - and this is a serious problem for Miliband and the party in general.