Image copyright PA Image caption UKIP topped the polls in 2014 but a lot has changed since then

The UK's political parties are gearing up to fight elections to the European Parliament in six weeks' time.

The planning needed to stage the polls on 23 May is under way, even though Theresa May still hopes the UK will have left the EU by then and they won't need to happen.

As recently as the end of March, the prime minister said the public would find it "unacceptable" to have to elect a new group of 72 MEPs almost three years after they voted to leave the EU.

But things have changed since then.

Under terms agreed with EU leaders in Brussels, the UK has been given a Brexit extension until 31 October.

The UK "must hold the elections to the European Parliament" and if it fails to do this, the UK will leave on 1 June without a deal.

Given the political backdrop, they could turn out to be the most controversial and unpredictable European elections in UK history.

How are the parties preparing?

In short, in something of a hurry.

The parties have to submit the names of the candidates representing them to the elections watchdog by 25 April or, in the case of the South West region, 24 hours earlier.

MEPs are elected on a regional list basis, representing Scotland, Wales, Northern Ireland and nine English regions, using a system of proportional representation.

If you want to know more about the European Parliament, the UK electoral process and the cost of staging the elections, read our Reality Check guide.

While many Brexiteers are angry about the UK having to participate at all, believing it is a waste of time and money, the likelihood of any kind of boycott seems remote.

Many now regard the poll as a proxy referendum on Brexit and the UK's future in the EU.

UKIP, whose party topped the 2014 poll, has launched a crowdfunding campaign and announced its slate of two leading candidates in each of the regions.

How are candidates being selected?

Image caption The leader of the Conservatives in the European Parliament has said he will stand again

Given the lack of time, the selection process is likely to be more truncated than usual.

Labour is giving its existing MEPs preferential treatment by guaranteeing them spots at the top of each regional candidate list. As it stands, 16 of the 20 Labour MEPs elected in 2014 have applied to stand.

Would-be Conservative candidates had until Tuesday 9 April to put themselves forward.

The Conservative Home website said it was very unlikely all 18 incumbents would try again as many have been planning for life after Brexit.

It queried whether the party would be able to fill all 70 spots on its respective lists with "candidates' WhatsApp groups full of jokes about the futility of taking part".

The current leader of the Conservative group in the European Parliament, Ashley Fox, has confirmed he will be taking part and joked about the likely reception he could get on the doorsteps.

The Liberal Democrats and the Green Party see the polls as an opportunity to make the case for continued EU membership, with the Greens vowing to "mobilise one of the strongest pro-EU movements ever".

However, talk of different anti-Brexit, pro-referendum parties co-operating, either by putting forward a single list of candidates or not standing in certain regions, has come to nothing.

How much will the elections cost?

The estimated cost of taking part in European Parliamentary elections has been given as up to £109m. This is based on the cost in 2014 which was £108.7m.

What happened last time?

The political landscape was very different the last time the European elections were held in 2014.

The Conservatives and Lib Dems were governing in coalition and even though David Cameron had signalled his desire to hold an EU referendum if he won an overall majority, the prospect still seemed far off.

But, with hindsight, the result could be seen to have been harbinger of things to come as UKIP topped the polls for the first ever time, winning nearly 27% of the vote and 24 seats.

The party made its first proper electoral breakthrough a decade earlier when it won 15% of the vote and 12 seats in 2004's polls.

European elections have historically been more fertile territory for anti-establishment parties, which have struggled to translate votes into seats in general elections because of the first-past-the-post system.

The Conservatives and Labour are understandably nervous that this trend will continue if the polls go ahead.

Will there be any new faces this time?

Image copyright Reuters Image caption Same message, different party: Nigel Farage is heading the new Brexit Party after leaving UKIP

For the past 20 years, UKIP has been the insurgent party in British politics but now it is facing a challenge from its former leader Nigel Farage, who has launched a rival outfit called the Brexit Party.

Mr Farage, who will be standing as a candidate in the South East region, has vowed to "teach the establishment a lesson".

The party, which has launched its campaign, is positioning itself as the real alternative to the Conservatives and Labour which it says have betrayed the 17.4 million people who voted to leave the EU.

Image copyright Reuters Image caption Ex-Tory MP Heidi Allen is leading The Independent Group into the elections

There is little love lost between Mr Farage and Mr Batten after the latter appointed anti-Islam campaigner Tommy Robinson as an adviser.

There are reports the ex-English Defence League leader could play some kind of role in UKIP's campaign.

Eurosceptic voters are likely to have a plethora of choice in May's polls, with other parties set to stand including Our Nation, an entity formed last year by the short-lived UKIP leader Henry Bolton.

The prospect of a possible realignment is not confined to the right of British politics.

The breakaway Independent Group of former Labour and Tory MPs say they will be fielding a substantial number of candidates after their application to become a political party was accepted by the Electoral Commission.

They will fight the election as Change UK - The Independent Group, on a platform of seeking another referendum on the terms of Brexit, with the option to remain.

Interim leader, ex-Tory MP Heidi Allen, has said the poll is a "real opportunity" to build a new political movement, suggesting the public is crying out "for someone to lead and say we can just stay".

What will happen after the elections?

How long any UK MEPs get to stay in Brussels and Strasbourg is anyone's guess at this stage.

The new European Parliament is set to reassemble in early July, and the Brexit extension is due to run up to 31 October.

It is no longer beyond the realms of possibility that UK politicians and their staff, who only recently were contemplating a future outside the European Parliament, will find themselves there.