EU and British flags fly outside the European Commission building in London, Britain August 12, 2017. REUTERS/Neil Hall

LONDON (Reuters) - Britain on Wednesday said it had sent dozens of letters telling European Union nationals to leave the country in error, an embarrassing mistake as the issue of the rights of such citizens in the UK is being negotiated.

Britain’s interior ministry said it was investigating after around 100 of the letters were sent to citizens from other European Union countries, saying they would be removed under immigration law.

“A limited number of letters were issued in error and we have been urgently looking into why this happened. We are contacting everyone who received this letter to clarify that they can disregard it,” a spokeswoman for the Britain’s Home Office said in a statement.

“We are absolutely clear that the rights of EU nationals living in the UK remain unchanged.”

Eva Johanna Holmberg, a Finnish academic who is married to a Briton, told The Independent newspaper that she “couldn’t believe what she was seeing” when she received the letter.

While Britain has promised a generous deal for EU citizens following Brexit, there is not yet agreement over how rights will be protected.

The rights of EU citizens in Britain is one of three issues the bloc wants to settle before it begins discussing the future relationship between Britain and the EU. The EU says more progress on those core issues needs to be made before talks move on.