When Adrian Coman and Clai Hamilton went out on a date in New York one June day 16 years ago, little did they know that their love story would end in a happy day for gay rights in Europe.

But from Tuesday (5 June), the six EU countries that do not recognise same-sex spouses' immigration rights will be forced to do so in line with an EU court ruling on C‑673/16, in what became the Coman-Hamilton case.

"In the directive on the exercise of freedom of movement, the term 'spouse', which refers to a person joined to another person by the bonds of marriage, is gender-neutral and may therefore cover the same-sex spouse of an EU citizen," the EU's top tribunal said.

"We can now look in the eyes of any public official … across the EU with certainty that our relationship is equally valuable and equally relevant," Coman, a Romanian national, said.

"It is human dignity that wins today," he said.

The couple currently live in the US and it could take two years or more for Romania to fall into line with the EU verdict, pending potential appeals.

But Coman voiced hope that Tuesday's ruling had changed hisdestiny.

"When I grow older, I would like to move back to where I was born and where I grew up. I'd like to be able to do that with my family, with the man I love," he said.

The EU verdict goes in the teeth of Romania's civil codex, whose Article 277 states: "Same-sex marriage contracted abroad, whether between Romanian citizens or by foreign citizens, is not recognised in Romania".

It also goes against similar laws in Bulgaria, Latvia, Lithuania, Poland, and Slovakia.

If they act in contempt, it could lead to European Commission infringement proceedings and fines. It could also help wronged gay couples to seek damages in national courts.

The verdict comes a time when some right-wing governments in the region were already waging war with the EU on asylum laws.

Forcing them to take in Muslim refugees was an affront to national sovereignty and a threat to national identity, leaders in Hungary, Poland, and Slovakia have said.

Hungary had replaced "a shipwrecked liberal democracy with a 21st-century Christian democracy" based on "the traditional family model of one man and one woman", its prime minister, Viktor Orban, said in May.

Hungary was not affected by Tuesday's ruling, but Orban is a leading proponent of the region's new nationalist-conservative ideology.

Hungarian, Polish, and Slovak officials also argued against EU and Dutch ones in court hearings on C‑673/16.

The fact that Coman, a Romanian national, worked for the European Parliament at one time, could help eurosceptics attack the ruling as an EU diktat.

The notion, no matter how misleading, that the EU had forced member states to recognise gay marriage, could also provide fodder for anti-EU British tabloids, right-wing US media, and Russia's propaganda machine.

The court ruling covered only residential rights and did "not require [any given] member state to provide, in its national law, for the institution of homosexual marriage", the EU tribunal said in a clarification on Tuesday.

Happily ever after?

That date in New York, in Central Park, on 22 June 2002, began a love affair that led Coman to propose to Hamilton, a US national, eight years later.

"I was already far away from him for a year. While having a long-distance relationship, I understood he is my life partner, for better or for worse," Coman said.

"He was very emotional about it, said 'Yes' immediately, although on Skype, but it was very romantic," Coman said.

The two men married in Belgium in 2010, but when they tried to move to Romania in 2013, it declined to grant Hamilton a residency permit, prompting their legal battle in national and EU courts.

If Coman had married a foreign woman, Romania would have given him a permit out of hand.

The landmark nature of the case saw NGOs and one law firm rally round the pair.

The Brussels office of US law firm White & Case lent them the services of a partner and two junior staff on a pro bono basis.

Iustina Ionescu, a Romanian human rights lawyer, Robert Wintemute, a British legal scholar, Accept, a Romanian gay-rights NGO, and Ilga-Europe, a Brussels-based NGO, also got on board.

The judges' decision was "a great victory for same-sex couples across Europe," Accept's Romanita Iordache said on Tuesday.

"We want to see the Romanian authorities move swiftly to make this judgment a reality," Ilga-Europe's Evelyne Paradis said.

Europe's gay rights movement also scored a win in Malta last year, when the formerly conservative, Roman Catholic island, fully recognised same-sex marriages at home, becoming the 13th EU state to do so.

But even if the situation was improving in northern and in parts of southern Europe, the further east one travelled on the map, the fewer rights gay people had.

"Trends like populism and nationalism aren't just political buzzwords - they can have a lasting impact on the lives of LGBTI people," Ilga-Europe said in a recent report, referring to the rise of Orbanism.

Better late than never

Europe's civil rights movement more broadly speaking scored a win in Ireland when it legalised abortion in a referendum last month.

Ireland, another Roman Catholic society, also legalised gay marriage last year, but for some the changes merely highlighted to what extent some EU states were latecomers in the trend.

Sex between two men was illegal in Ireland until 1993.

It was illegal in Romania until 1996 and in Cyprus until 1998.

Most EU countries, including Germany, abolished penalties in the 1960s and 1970s, but Denmark did it already in 1993, while France did it in 1791.

Articles 10 and 19 of the EU Treaty and article 21 of the European Charter on Fundamental Rights now forbid discrimination on grounds of "sexual orientation."

The EU's enlargement criteria, adopted in 1993, also prohibit discrimination against "minorities".