Hong Kong's top court has refused to recognise same-sex marriages, but ordered the city to formulate an alternative framework within two years.
It is a partial victory for an appeal by pro-democracy activist Jimmy Sham, who had sought official recognition of his marriage to his husband.
The Court of Final Appeal rejected this but also said the city had failed to actively provide alternative options.
Despite legal challenges, same-sex marriages are not currently allowed.
While LGBT advocates have over the years won small victories, there is only limited recognition of same-sex unions legalised outside the territory, in matters regarding taxation and spousal visas for foreign residents.
But Tuesday's ruling said that the government's failure to actively provide alternative options - like civil unions - for LGBT couples violates their rights.
"The absence of legal recognition of (same-sex partners') relationship is apt to disrupt and demean their private lives together in ways that constitute arbitrary interference," said Justice Patrick Keane.
In lieu of the ruling, the court gave the government two years to form an official framework for recognising unions between members of the same sex.
Since launching a legal challenge - known as a judicial review - in 2018, Mr Sham has twice failed to convince the courts to recognise his marriage.
He has argued that the city's ban on same-sex marriages, as well as the lack of alternative frameworks, violate his right to equality.
Mr Sham brought his case to the Court of Final Appeal after his last attempt to convince appeal judges in August 2022 failed.
A judicial review is a court hearing that lets people challenge government policies and decisions. Pro-government media have argued in recent years that political activists like Mr Sham are abusing the system.Since coming to power in 2022, Hong Kong leader John Lee and his administration have repeatedly warned of "soft resistance" against national security - which could include the use of judicial review lawsuits.
Mr Sham, a key figure in the 2019 anti-government protests, is currently under detention on subversion charges unrelated to his appeal. He is among the 47 pro-democracy activists charged under the controversial national security law.
China says the law is needed to maintain peace in the financial hub, but critics say it strips Hong Kong of its autonomy, and gives Beijing wide-ranging powers to shape life in the city like never before.
Since the passage of the law, the leadership in Hong Kong has been largely been replaced by lawmakers approved by Beijing.
Polls suggest that there is rising support for same-sex marriages among the Hong Kong public. A survey this year found 60% in favour of same-sex marriage, compared to 38% a decade ago.
The territory has in recent years been LGBT-friendly. For example, it is due to host the 11th Gay Games later this year - the first time the competition will be held in Asia.
However the organisers have been facing a backlash from conservative camps in both the public and the government.
Pro-Beijing lawmakers warned against the city hosting the games, with some calling it "disgraceful" and a "wolf in sheep's clothing", saying that it could violate the security law.
Fearing that their athletes could be charged under the law, Taiwan, the only place in Asia that recognises same-sex marriage, pulled out of the games in 2021.
Other setbacks include termination of the city's only LGBTQ-themed radio chat show in late July. RTHK, the government-owned broadcaster, cited "programme change" as a reason.
Sentiments in the LGBT community in Hong Kong remain calm, with no sense of any suppression because most people have no ill feeling towards same-sex relationships, according to a 40-year-old expat who is a prominent LGBT event organiser in the city and did not want to be named.
He told the BBC: "When it comes to the lawmakers - yes there are certain individuals who have been speaking against the Gay Games, but I personally don't think it's got anything to do with the national security law.
"It's more about getting recognised by Beijing. Hong Kong in general has progressed in the past seven years with LGBT rights. It's slow but it's also steady and not turning backwards."