HONG KONG (Reuters) - Hong Kong’s top court ruled on Wednesday that a British lesbian should be granted a spousal visa in a landmark judgment that could open the door for expatriate same-sex partners to move to the Chinese-ruled city.

The British woman, who requested to be identified only as QT in court, sued the director of immigration in 2014 after she was denied a spousal visa that would have granted her resident status and allowed her to work without the need for a separate visa.

The woman and her partner, a dual British and South African national identified only as SS and who was offered work in Hong Kong, had entered into a civil partnership in Britain. QT did not appear in court.

“Although I cannot be with you in person today, that does not diminish the joy I feel, knowing that Hong Kong’s highest court has upheld my right, as a lesbian woman, to be treated equally by the Hong Kong government,” QT said in a statement.

She plans to live in Hong Kong, instead of flying back and forth to Britain as she has been doing for years.

“I won’t feel like a second citizen anymore and I can have the basic rights like anyone else, from as simple as having a library card to having healthcare,” she told reporters by phone.

The unanimous ruling by five judges, upholding a lower court's decision, brings to an end the case involving rights for the lesbian, gay, bisexual and transgender (LGBT) community, which won support from more than 30 global banks and law firms, including Goldman Sachs GS.N and Morgan Stanley MS.N.

“This ruling strengthens Hong Kong’s ability to attract global talent and its competitiveness as Asia’s pre-eminent global center for commerce,” the companies said in a statement.

The decision goes beyond immigration and effectively recognizes the rights of local and foreign same-sex couples who legally entered civil partnerships abroad, said the British woman’s lawyer, Michael Vidler.

FILE PHOTO - People take part in the annual LGBT pride parade in Hong Kong, China November 26, 2016. REUTERS/Bobby Yip/File Photo

“We never argued this case is about same-sex marriage for Hong Kong, but we hope this case will pave the way for exactly that,” he said outside the Court of Final Appeal.

Hong Kong’s Immigration Department said it respected the ruling.

“We are studying the judgment carefully and shall seek legal advice as necessary before deciding the way forward,” it said.

“SHAKY FOUNDATIONS”

Hong Kong could become the first Asian jurisdiction to officially grant dependent visas to same-sex partners, even though it already makes some exceptions to diplomats.

Foreign diplomats in mainland China also say the Chinese government has been issuing de facto spousal visas to same-sex partners in recent years.

Although Taiwan set a precedent in Asia last year when its constitutional court ruled that same-sex couples have the right to legally marry, gay marriage has not been legalized yet.

An official website stated that same-sex spouses do not qualify as spouses for immigration purposes.

Japan does not officially grant dependent visas to same-sex couples, but some married foreign couples say they managed to get one.

Hong Kong is a popular destination for expatriates, many of whom work in the city’s financial services and legal sectors.

Homosexuality was decriminalized in 1991, although marriage is legally defined as a monogamous union between a man and a woman. It does not recognize same-sex marriage.

There is no law against sexual discrimination in the territory which is governed under a “one country, two systems” formula that promises it a high degree of autonomy, a legal system separate from that of mainland China and an independent judiciary.

In a 45-page judgment, the judges said the director of immigration’s assertion that an obvious difference existed between marriage and a civil partnership rested on “shaky foundations”.

The court also said that while the director of immigration’s policy aimed to attract foreign talent, the act of rejecting same-sex partners was counter-productive.

It had not allowed the 31 global banks and law firms’ to join in the court case, but acknowledged their effort in the judgment.

“As is evident from the attempted intervention of the banks and law firms, the ability to bring in dependants is an important issue for persons deciding whether to move to Hong Kong,” it said.

Veteran LGBT activist Billy Leung, who arrived at court with a small rainbow flag, said he knew at least six same-sex couples who had chosen not to move to Hong Kong or had left the city in the past five years over what they described as a lack of LGBT-friendly policies.

“The struggle is real,” he said.