On Tuesday, the European Court of Justice (ECJ) ruled that married same-sex couples have a right to live together in European countries that do not recognise gay marriage.

The European Union ruled that countries must recognise the rights of migrants who want to live in their spouse’s native country, according to the Guardian. The ruling came from a court case brought by a gay couple in 2013 who claimed that Romanian authorities discriminated against the couple, preventing them from living together, the New York Times reported.

Adrian Coman, who is Romanian and once worked for the European parliament, lived with his American boyfriend Claibourn Robert Hamilton for four years in the United States before marrying him in Brussels, Belgium, in 2010.
The couple planned to move to Romania until the country refused to give the couple permission to reside there.

“Although the member states have the freedom whether or not to authorise marriage between persons of the same sex, they may not obstruct the freedom of residence of an EU citizen by refusing to grant his same-sex spouse, a national of a country that is not an EU Member State, a derived right of residence in their territory,” the court ruled.

ECJ senior adviser Advocate General Melchior Wathelet stated that the word “spouse” will include married individuals of different or same sexes, according to the BBC.

The couple was ecstatic about the outcome of the case. “We are one step closer to being recognised as a family and I am truly elated,” Hamilton said.

“We can now look in the eyes of any public official in Romania and across the EU with certainty that our relationship is equally valuable and equally relevant,” said Coman.

Although Romania decriminalised homosexuality in 2001, it does not yet recognise gay marriage. Six countries in the European Union do not recognise gay marriage. These countries are Romania, Poland, Latvia, Bulgaria, Lithuania and Slovakia.