All European Union countries must recognise the residency rights of same-sex spouses, the EU's top court has ruled.

In a landmark ruling for gay rights in Europe, the European Court of Justice ruled Romania must grant residence to the American husband of a local man even though Romania itself does not permit same-sex marriage.

Adrian Coman, from Romania, and his American husband, Claibourn Robert Hamilton, have fought a six-year legal battle to get their marriage, which took place in Belgium in 2010, legally recognised in the eastern European country.

The ruling has implications for tens of thousands of same sex couples in Romania, Poland, Slovakia, Bulgaria, Lithuania and Latvia.

Currently, the formerly communist countries don’t offer legal protection to same-sex couples.

While the case did not touch on the freedom of member states to set their own matrimony laws, campaigners have called on Brussels to push states to legalise same-sex marriage as a fundamental human right.

Instead, the Luxembourg-based court upheld the rights of EU citizens to move freely across the bloc with their families.

“Although the member states have the freedom whether or not to authorise marriage between persons of the same sex,” the judges said, “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 top 15 worst countries to be gay in Europe Show all 15 1 /15 The top 15 worst countries to be gay in Europe The top 15 worst countries to be gay in Europe 15. Italy Getty Images The top 15 worst countries to be gay in Europe 14. Macedonia Processed by: Helicon Filter; The top 15 worst countries to be gay in Europe 13. Poland Getty Images The top 15 worst countries to be gay in Europe 12. Liechtenstein The top 15 worst countries to be gay in Europe 11. Lithuania The top 15 worst countries to be gay in Europe 10. Latvia This content is subject to copyright. The top 15 worst countries to be gay in Europe 9. San Marino The top 15 worst countries to be gay in Europe 8. Moldova The top 15 worst countries to be gay in Europe 7. Belarus Getty Images The top 15 worst countries to be gay in Europe 6. Ukraine Getty Images The top 15 worst countries to be gay in Europe 5. Monaco The top 15 worst countries to be gay in Europe 4. Turkey Getty Images The top 15 worst countries to be gay in Europe 3. Armenia The top 15 worst countries to be gay in Europe 2. Russia Getty Images The top 15 worst countries to be gay in Europe 1. Azerbaijan Norway's Mette B. Bjerknaes competes during the Powerboat race on July 6, 2013 in Baku. Baku hosts the second race F2 World Championship 2013. The 2 mile course is designed just in front of the Baku Boulevard facing the Caspian Sea. AFP PHOTO / TOFIK BABAYEV (Photo credit should read TOFIK BABAYEV/AFP/Getty Images) Getty/AFP

Mr Coman, a 46-year-old gay rights activist, 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 for the purpose of free movement within the EU.”

Mr Hamilton, also 46, speaking by video link from New York, said: “We are one step closer to being recognised as a family and I am truly elated.”

Practically, the ruling means Mr Hamilton, as a non-EU citizen, will have employment rights and health benefits which were previously denied to him.

How the world reacted to gay marriage in the USA

Opposition to same-sex relationships is often fierce in conservative Romania, where homosexuality was only decriminalised in 2002.

The European Commission has insisted the ruling is not part of a push from Brussels to force social change across the bloc.

When asked about opposition to same-sex marriage in parts of eastern European, Margaritis Schinas, a spokesman for the European Commission, said: ”Member states are in charge – but this is a useful clarification in terms of avoiding discrimination.”