Britain's interior ministry sent deportation warnings to around 100 EU citizens by mistake, it emerged on Wednesday, an incident that campaigners said would increase fears among Europeans living in Britain.
Eva Johanna Holmberg, a Finnish historian at Queen Mary University of London specialising in the study of early modern Britain, was one of the recipients.
Holmberg said she received the Home Office letter last week, telling her that if she did not leave the country within a month then the ministry would have to give "directions for removal".
The letter said Holmberg, who is married to a Briton and has lived in Britain for years, was now "a person liable to be detained under the Immigration Act".
"I could not believe my eyes," Holmberg told the BBC on Wednesday, saying that she had contacted a lawyer to ask if she could appeal against deportation.
But after her case prompted a furore, the Home Office was forced to apologise for the mistake on Wednesday.
"We have spoken to Ms Holmberg to apologise for this and assure her that she can remain in the UK," it said in a statement.
A spokesman said around 100 similar letters were sent.
"We are contacting everyone who received this letter to clarify that they can disregard it," he said.
"We are absolutely clear that the rights of EU nationals living in the UK remain unchanged".
Britain is in negotiations with the European Union over the future status of European nationals living in Britain and Britons in the EU after Brexit.
Immigration was a top issue for the Brexit campaign and Prime Minister Theresa May has promised to cut the number of EU nationals moving to Britain.
"This is shameful stuff," said James McGrory, head of the pro-EU campaign group Open Britain.
"It's little wonder that many EU citizens feel worried about their future status in the UK when they hear of people with every right to be here getting letters threatening their deportation," he said.