BRUSSELS (Reuters) - All but six European Union states are bidding to host one or both the London-based EU agencies that will be relocated after Brexit, setting up a competition that could easily escalate into a squabble.

Flags are seen at the EU Commission headquarters ahead of a first full round of talks on Brexit, Britain's divorce terms from the European Union, in Brussels, Belgium July 17, 2017. REUTERS/Yves Herman

Races for the jobs and prestige associated with hosting EU agencies often become heated, but this diplomatic contest risks weakening the unity of the EU’s 27 remaining states in the midst of delicate two-year Brexit talks that started in March.

Nineteen cities have made themselves candidates to host the European Medicines Agency (EMA) while eight are offering to give the European Banking Authority (EBA) a home, the Council of the European Union said on Tuesday.

Only Hungary, Slovenia, Cyprus and the three Baltic states of Estonia, Lithuania and Latvia decided not to join the fray.

Germany, France, Ireland, Austria, Poland and Belgium are bidding for both the agencies.

The European Commission will assess the candidates by September but the decision rests with EU leaders who will try to reach a consensus deal at their next summit in October. A final decision is expected a month later.

The EMA employs nearly 900 staff and acts as a one-stop-shop for approving and monitoring the safety of drugs across Europe. With an annual budget of $360 million and currently attracting 36,000 experts a year to London for meetings, it is a prized asset.

Milan, Copenhagen, Athens, Amsterdam and Barcelona are among the candidates to host the agency, with Milan seen as a possible frontrunner.

The EBA, whose 160 employees write and coordinate banking rules for the bloc, is coveted by Frankfurt, Paris, Luxembourg and Prague, among others. The German financial hub is viewed as likely to have the upper hand as it already hosts the European Central Bank and the EU insurance agency.

Vienna, Warsaw, Dublin and Brussels, which is home to the EU’s executive Commission, submitted applications to host both the agencies.

For a FACTBOX click