Image copyright AFP Image caption Both agencies are currently headquartered in Canary Wharf in London

EU leaders have officially launched the competition between member states to decide which will host two London-based EU agencies, responsible for medicines and banking.

The relocation must take place by the Brexit deadline - 30 March 2019.

Some countries are bidding to host both the European Medicines Agency (EMA) and European Banking Authority (EBA).

It means hundreds of jobs moving from London, along with significant revenue from hotel stays and conferences.

The deciding vote will take place in November.

The EU 27 agreed on the selection process on Thursday night, after UK Prime Minister Theresa May had left the Brussels summit.

The 27 are determined that the UK will pay the relocation bill, as Brexit was a UK decision.

The EMA's total number of staff in 2015 was 890, while the EBA's was 189. Both are headquartered in Canary Wharf.

The EMA had 36,000 visitors in 2015, and 30,000 hotel nights were booked, the European Council said.

What do the agencies do?

EMA

Monitors the safety and quality of medicines EU-wide and issues scientific advice

Provides a single route for evaluating medicines, avoiding duplication by member states

Helps innovation by collaborating with medicine manufacturers

EBA

Works to harmonise European banking rules and supervisory practices

Assesses risks and vulnerabilities in EU banking sector

Mediates in cross-border disputes between financial authorities

The national rivalry over hosting the agencies will be closely watched. It could reveal some wider tensions over Brexit, so it will be an early test of EU unity in the tough Brexit negotiations.

In 2001 Italy's then Prime Minister Silvio Berlusconi mocked Finland's bid to host the European Food Safety Authority (EFSA).

"There is absolutely no comparison between culatello (speciality ham) from Parma and smoked reindeer," Mr Berlusconi was quoted as saying.

Italy's bid beat Finland's, and the EFSA opened in Parma in 2005.

First the European Commission will assess the competing bids and make its recommendations.

In November each of the EU foreign ministers will vote in order of preference - three points for the preferred bid, two points for the second-favourite and one point for the third.

Accessibility and efficient infrastructure are the top two agreed criteria. But the EU also wants the new hosts to have good "European-oriented" schooling and job opportunities for the families of agency staff.

Image copyright Getty Images Image caption Vienna is among the cities vying to host the EBA and its employees

Germany's Spiegel news website joked that the voting would be rather like the Eurovision Song Contest.

"That's why the Germans fear equally wretched results," Spiegel said - even though Frankfurt, as HQ of the European Central Bank, would be a logical host for the EBA.

A flavour of this new EU "beauty contest" was provided by Austria.

Austrian Foreign Minister Sebastian Kurz said his country "is already a terrific location for many international organisations.

"We have wonderful general conditions in Vienna, and that's why I consider that we are a very attractive location."

The EU is keen to locate some of its agencies in the newer member states of Central and Eastern Europe - it has stated that as an aim.

But their rejection of the EU asylum policy - notably refusing to take in refugees currently in Italy and Greece - may count against them.