LUXEMBOURG — In a landmark ruling for gay rights in Europe, the E.U.'s top court said Tuesday that Romania must grant residence to the American husband of a local man even though Romania does not itself permit same-sex marriage.

In a case that has highlighted social differences between western Europe and the more conservative ex-Communist east, the European Court of Justice ruled that Romania must accept the validity of a 2010 Belgian marriage and treat American Clay Hamilton as Adrian Coman's spouse under E.U. law.

"It’s an amazing day for us and we’re very happy to have each other and all the people and the institutions that believed in us that supported us along these years," Coman told Euronews. "Romania is my country and I want it to be my husband’s country as well."

The case did not touch on the freedom of member states to set their own matrimony laws, although campaigners have called on Brussels to push states to legalize same-sex marriage as a fundamental human right. The decision, though, did uphold the rights of E.U. citizens to move freely across the bloc along with their families.

"Although the member states have the freedom whether or not to authorize marriage between persons of the same sex," the judges said, "they may not obstruct the freedom of residence of an E.U. citizen by refusing to grant his same-sex spouse, a national of a country that is not an E.U. member state, a derived right of residence in their territory."

The case arose because Hamilton's right as a non-E.U. citizen to live in Romania permanently was dependent on his status as Coman's spouse. Coman challenged a Romanian decision to limit Hamilton's residence to a three-month visa and a Romanian court referred the matter to the Court of Justice in Luxembourg.

Coman welcomed the ruling. "We can now look in the eyes of any public official in Romania and across the E.U. with certainty that our relationship is equally valuable and equally relevant for the purpose of free movement within the E.U.," he said.

The deputy leader of the liberal bloc in the European Parliament, Sophie in 't Veld, called the ruling "fantastic news and a landmark opinion for rainbow families."

"Freedom of movement is a right of all E.U. citizens," she said. "It cannot be restricted because of whom they love."

The European Commission insisted that the ruling was not part of a push from Brussels to force social change in the bloc.

"Member states are in charge — but this is a useful clarification in terms of avoiding discrimination," commission spokesman Margaritis Schinas told reporters when asked about opposition to same-sex marriage in parts of eastern Europe, where governments have also clashed with the E.U. executive over other civil rights.

FOLLOW NBC OUT ON TWITTER, FACEBOOK AND INSTAGRAM