(CNN)The European Union's top court ruled that same-sex couples are entitled to the same residency rights as other married couples, even in member states that don't recognize gay marriage.
EU's top court hands major win to same-sex couples
The term "spouse" is gender-neutral and includes same-sex partners, the Court of Justice of the European Union concluded in its judgment. Member states should grant all married couples the right to move and reside freely within the EU, regardless of their sexual orientation, the court said.
With its judgment, the court sided with a gay couple who was denied the right to reside together in Romania, which does not recognize same-sex marriage.
Advocacy groups hailed the court's judgment as the first of its kind to include same-sex couples in the definition of spouse for the purpose of free movement, which allows EU citizens to move and reside freely among member states. But it stopped short of obligating Romania or other member states to allow same-sex marriage.
While member states are free to decide whether to allow same-sex marriage within their borders, the court said that they should recognize same-sex marriages performed in other EU states for the purposes of residency and free movement.
"Equality, fairness and pragmatism were at the core of today's verdict from Luxembourg. The CJEU has acknowledged that rainbow families should be recognized equally in the eyes of the law on freedom of movement," Evelyne Paradis, executive director of advocacy group ILGA-Europe, said in a statement. "Now we want to see the Romanian authorities ... move swiftly to make this judgment a reality."
Adrian Coman, a dual US-Romanian citizen, met Claibourn Hamilton, a US citizen, in New York in June 2002. The two lived there together from 2005 to 2009.
Coman moved to Brussels in 2009 to work at the European Parliament as a parliamentary assistant while Hamilton stayed in New York. They were married in Brussels in 2010.
In December 2012, when Coman's employment ended, the couple considered moving to Romania to be closer to Coman's family. They contacted Romanian authorities to find out how Hamilton could obtain the right to work and reside lawfully there for more than three months as a member of Coman's family.
Under the EU's right to free movement, non-EU spouses married to EU citizens may join their partner in a member state where the European national resides. The couple sought a residency permit for Hamilton based on the right to free movement, assuming it would apply to Hamilton. Romanian authorities said that Hamilton could not be classified as a spouse of an EU citizen in Romania because it does not recognize marriage between persons of the same sex.
The couple brought an action before the Romanian courts seeking a declaration of discrimination based on sexual orientation. Romania's Constitutional Court asked the Court of Justice to determine if Hamilton should be considered a spouse of an EU citizen with the same right to permanent residency.