Image caption Nigel Farage and Nick Clegg: Polls apart politically

They may be miles apart in terms of policy and ideology but if there is one thing that seems clear after Thursday's polls it is that the the UK Independence Party have taken on the Lib Dems' mantle as the by-election party to beat.

Labour predictably romped home in the three safe seats that were up for grabs.

But UKIP finished second in two of them - grabbing votes from bigger, more venerable parties and giving the political establishment, in the form of Labour on this occasion, a fright.

This used to be the job of the Liberal Democrats. By-elections were very much their domain and they have scored some famous victories over the years.

But Thursday must go down as one of the worst nights in the party's history.

Rotherham Sarah Champion (Labour) 9,866 (46.25%, +1.62%)

Jane Collins (UKIP) 4,648 (21.79%, +15.87%)

Marlene Guest (BNP) 1,804 (8.46%, -1.96%)

Yvonne Ridley (Respect) 1,778 (8.34%)

Simon Wilson (Conservative) 1,157 (5.42%, -11.32%)

David Wildgoose (English Democrat) 703 (3.30%)

Simon Copley (Independent) 582 (2.73%, -3.58%)

Michael Beckett (Liberal Democrat) 451 (2.11%, -13.87%)

Ralph Dyson (TUSC) 261 (1.22%)

Paul Dickson (Independent) 51 (0.24%)

Clint Bristow (Independent) 29 (0.14%)

Labour majority 5,218 (24.46%)

7.13% swing Labour to UKIP

Turnout: 21,330 (33.63%, -25.37%)

In Rotherham, Nick Clegg's party came eighth. No major party has ever come eighth in a by-election before.

In 1990, the SDP candidate in the Bootle by-election came seventh, an event that was quickly followed by the demise of the party, with the majority of members joining the newly created Liberal Democrats.

We have long known that Lib Dems are bearing the brunt of public anger at unpopular coalition policies. The Conservative vote is holding up surprisingly well by comparison.

But Thursday's results brutally highlight how soft the Lib Dem vote appears to be in some parts of the country.

The party almost snatched second place at the general election in Rotherham, with 16% of the vote. It was a similar story in Middlesbrough, where they came third with 15.9% of the vote in 2010.

Compare that with the 2.1% and 9.1% they received in those two seats on Thursday.

By-elections with low turnouts can often exaggerate and distort the picture - and it is dangerous to read too much into them.

But these were not freak, one-off results.

The Lib Dem vote was 10% down on the general election at the Corby by-election two weeks ago, although their fourth place there looks positively healthy by Thursday's standards.

It is not that UKIP is necessarily snatching votes from the Lib Dems - the two parties are at opposite ends of the political spectrum.

Media playback is unsupported on your device Media caption UKIP leader: We are now talking about how Britain should be governed

The Lib Dems are the most pro-EU party in Britain, while UKIP wants Britain out of the EU.

But Nigel Farage's party does now appear to be the main repository for protest votes against the government or, perhaps, the political class in general, even though it is a label he rejects, insisting the party has a fully worked out plan for governing the country.

"If UKIP's a protest vote then there are lot of protesters out there," he tweeted earlier.

Unlike the Lib Dems, UKIP are still seen by some as a single issue protest party (although the Lib Dems have successfully played the single issue game in the past, most notably over the Iraq war).

They have been able to capitalise on the hardening of the public mood against the EU, with one recent poll suggesting more than 50% of the British public favour a British exit from the European Union.

Croydon North Steve Reed (Labour) 15,898 (64.71%, +8.69%)

Andy Stranack (Conservative) 4,137 (16.84%, -7.28%)

Winston McKenzie (UKIP) 1,400 (5.70%, +3.97%)

Marisha Ray (Liberal Democrat) 860 (3.50%, -10.48%)

Shasha Islam Khan (Green) 855 (3.48%, +1.51%)

Lee Jasper (Respect) 707 (2.88%, +2.35%)

Stephen Hammond (Christian Peoples Alliance) 192 (0.78%)

Richard Edmonds (National Front) 161 (0.66%)

Ben Stevenson (Communist) 119 (0.48%, +0.17%)

John Cartwright (Loony) 110 (0.45%)

Simon Lane (9/11 Was an Inside Job) 66 (0.27%)

Robin Smith (Young People's) 63 (0.26%)

Labour majority: 11,761 (47.87%)

7.99% swing Conservative to Labour

Turnout: 24,568 (26.4%, -34.25%)

But it would be wrong to portray them as the right wing of the Tory party in exile.

The significant thing about the Rotherham result is that it came in a rock solid Labour area.

The party undoubtedly benefited from the media storm over a local couple who had their foster children removed by the Labour Council because they were UKIP members.

They also took votes from the BNP, which counts the South Yorkshire town as one of its few remaining strongholds.

But the party's candidate, Jane Collins, insisted they have been doing groundwork in the area for years and they have scored successes in European elections there.

Concerns about "mass open door immigration" and general dissatisfaction with a remote, "out-of-touch" political elite strike a chord with working class Labour voters too, they argue.

The Lib Dems wrote the book on how to win by-elections and all parties, UKIP included, have attempted to copy their tactics.

UKIP's campaigns, with their poster vans and loud hailers, also hark back to an earlier era of by-elections.

But they have quietly been building up a far more professional and well-funded campaigning machine, which is now a far cry from the amateurish efforts of a few years ago.

Middlesbrough Andy McDonald (Labour) 10,201 (60.48%, +14.60%)

Richard Elvin (UKIP) 1,990 (11.80%, +8.10%)

George Selmer (Liberal Democrat) 1,672 (9.91%, -10.00%)

Ben Houchen (Conservative) 1,063 (6.30%, -12.48%)

Imdad Hussain (Peace) 1,060 (6.28%)

Peter Foreman (BNP) 328 (1.94%, -3.90%)

John Malcolm (TUSC) 277 (1.64%)

Mark Heslehurst (Independent) 275 (1.63%)

Labour majority: 8,211 (48.68%)

3.25% swing UKIP to Lab

Turnout: 16,866 (25.91%, -25.44%)

Of course, the big difference between UKIP and the Lib Dems is that the Lib Dems used to regularly win by-elections.

And analysis of the 12 Parliamentary by-elections that have taken place since 2010 suggests Mr Farage's party may still be some way from achieving that kind of breakthrough.

In eight of these contests, UKIP received 6% or less of the votes cast and lost their deposit in four.

The party came second for the first time in their history in a Westminster by-election in Barnsley Central in March last year, when Jane Collins gained 12.2% of the vote.

Mrs Collins, the party's Yorkshire area organiser, achieved their best performance to date in Rotherham on Thursday.

In the early 1980s, the SDP won the first by-election they contested with a 23.3% swing against Labour. They then took a seat from the Conservatives on a swing of 25.5%.

The Scottish National Party breakthrough in the February 1974 general election, when they gained seven seats, followed a trio of stellar by-election performances and we also saw the breakthrough of the DUP in Northern Ireland from 2001 onwards.

At present, UKIP is some way from emulating any of these parties, but Mr Farage will be hoping the party is well on its way.