The ruling confirms the residency rights of family members
The European Union's top court has ruled that non-EU nationals married to EU citizens are entitled to live in their spouse's country.
The court overruled a law in the Republic of Ireland, which grants residency only to those who have previously lived in an EU member state.
The European Court of Justice had studied the cases of four non-EU nationals married to Irish citizens.
It said the Irish refusal of residence permits contradicted an EU directive.
"The right of a national of a non-member country who is a family member of a Union citizen to accompany or join that citizen cannot be made conditional on prior lawful residence in another member state," the ruling said.
"The (EU) Directive applies to all Union citizens who move to or reside in a member state other than that of which they are a national, and to their family members who accompany them or join them in that member state."
The case against the Irish justice ministry was brought by four African men married to EU citizens resident in Ireland. The men had been refused residence permits.
The court said the host member state "is, however, entitled to impose penalties, in compliance with the Directive, for entry into and residence in its territory in breach of the national rules on immigration".