Nigel Farage
Ukip has promised a political earthquakeReuters

It has been one of the most interesting, unpredictable and eventful European parliament elections for decades and, as millions of voters finally delivered their verdict on the nation's politicians, the race for first place was on a knife edge.

The last YouGov poll suggested it was neck and neck between Labour and Nigel Farage's Ukip with 26% and 27% share of the votes respectively.

The Tories were heading for third place on 22% while there was a surprisingly close race for fourth place between the Greens, on 10%, and the Liberal Democrats on 9%.

The outcome of the European elections, for 73 seats in the 751-strong Brussels parliament, will not be released until late Sunday night or during Monday as counting cannot start until polls across all members states have closed.

In the meantime, the outcome of English and Northern Ireland council elections will be known during Friday. Up for grabs are 4,216 seats on 161 English councils, including every seat on all 32 London boroughs, and 462 seats on 11 Northern Ireland districts.

There are also polls to choose five London mayors in Hackney, Lewisham, Newham, Tower Hamlets and Watford.

While the result in the local polls will give an indication of how all the parties stand nationally, and show which ones voters trust to run local government, it is the EU poll that has Westminster on the edge of its seat and could have a marked effect on the morale and prospects of the "big three".

David Cameron and Ed Miliband
Cameron and Miliband wil face polls falloutReuters

And that is entirely down to the extraordinary rise of Ukip and the speculation over whether the Farage factor will turn out to be a mid-term protest or a long term phenomenon.

Farage ran a controversial campaign, marked by claims of racism and whipping up irrational fears over immigration and Europe.

But even his allegedly racist remarks about people not wanting Romanians living next door to them, and the more extreme antics of some members appears not to have dented his support and he is predicting his so-called people's army will win.

If he fails to get that first place, it will be claimed he has peaked and that support will evaporate by the time of the general election in a year's time. Which might happen anyway.

The opposition party would normally expect to win these mid-term polls but, thanks to Farage, there is a real prospect Labour will be pushed into second place. That would be disappointing but not disastrous for Ed Miliband.

He would come under pressure to match the Tories and offer an in-out referendum on EU membership but there is little chance that will happen.

He will also face calls from his own side to start offering a more radical and personally dynamic approach to the general election.

If Miliband hangs on to first place, however, we can expect to see some Labour celebrations and claims they have stopped the Ukip bandwagon.

It is David Cameron's Conservatives who have the most to lose in the EU elections, with that third place looming.

Cameron targeted much of his fire onto Ukip, pointing out it is only the Conservatives who would ever be in a position to give voters an in-out referendum on EU membership.

Like other leaders he has stopped short of branding Farage racist, but has said his views are unpleasant and divisive.

But with many Tory voters, and even some of his own MPs, attracted by Farage's uncompromising Euroscepticism he is bracing himself for a major setback.

Add to that the simple fact that mid-term polls are always the time to express disapproval of the government of the day and any bounce the Tories have received from the improving economy may not help them.

Nigel Farage nd Nick Clegg
Farage beat Clegg in TV debatesReuters

The prime minister's big test will come after the results are revealed on Sunday when he will have to stop any outbreak of panic in the Tory ranks at a Ukip surge and look towards holding onto the normally solid Newark seat against a Ukip challenge in the by election a couple of weeks later.

Meanwhile, Nick Clegg's Liberal Democrats are not only facing fourth place and possible wipeout of their EU parliament seats, but are battling to see off a threat from the Greens who could yet push them into a truly humiliating fifth place.

Clegg's attempt to shore up his position with TV debates against Farage backfired as he lost both of them.

He will face serious internal divisions after such a result although talk of plots to oust him as leader may be wide of the mark.