A European Union (EU) court has ruled that EU citizens who become British have more rights than other Brits to bring in spouses from outside the bloc to live in the UK.

The European Court of Justice (ECJ) rejected the claim that all British citizens should be subject equally to the Home Office’s stricter immigration regulations on gaining residency.

In June, an expert warned the case risked making Europeans “a super-privileged caste” in the UK.

The ruling means Europeans who gain British citizenship do not need to meet an earnings threshold of £18,600 a year, for example, to bring in a partner from outside the EU, unlike those born in the UK.

The case concerned an illegal Algerian immigrant, Toufik Lounes, who entered the UK in 2010 on a six-month tourist visa and overstayed for years.

In 2014, he married Spanish citizen Garcia Ormazábal. She came to the UK to study before working for the Turkish embassy and claiming British citizenship, whilst retaining her Spanish passport.

“The court has held that the UK has been wrong to refuse to recognise free movement rights for all those EU citizens who have been naturalising as British following the Brexit referendum,” Colin Yeo, an immigration lawyer, told The Times.

“After Brexit, though, all those rights will be lost unless an agreement is reached to retain them,” he added.

The Home Office had insisted Mrs. Ormazábal was no longer entitled to EU “family reunification” rights and denied her request for residency for her husband because she is a British citizen and must follow the British rules.

However, the EU court said in its judgement Tuesday that Mr. Lounes had a “derived right” to residency under the EU’s freedom of movement rules and must be allowed to stay.

Mr. Yeo added: “Any EU citizens who have naturalised as British and who have been denied their free movement rights should now consider re-applying. On the face of it, the UK will have to amend its approach very quickly and such applications should now succeed.”

A Home Office spokesman said: “We are reviewing the judgement and carefully considering its impact.”

The issue is likely to be part of Brexit discussions. The EU wants the ECJ to continue enforcing EU citizens’ rights after Brexit, including family reunification, and for Europeans to retain all their current privileges.

The British government, meanwhile, wants family members coming to Britain after Brexit to be treated as any non-EU citizens and insists that the ECJ’s supremacy over British courts will end.