HONG KONG — Hong Kong’s top court ruled on Wednesday that committed same-sex couples living in the city had the same rights to spousal visas as married heterosexual couples, a decision that advocates said could have ripple effects in advancing gay rights.

The case, which was brought in 2014 by a British woman who wanted to join her partner, galvanized gay rights activists who said that Hong Kong had not been living up to its image as “Asia’s world city” by failing, until now, to recognize such rights. Banks and law firms had pushed for such recognition to lure and keep top talent in the financial and business center.

“This judgment is a milestone for Hong Kong and a watershed moment” for gay rights across Asia, Jan Wetzel, senior legal adviser at Amnesty International, said in a statement.

The woman at the center of the case, known in court papers only as QT, came to Hong Kong as a visitor in 2011, several months after entering a same-sex civil partnership in Britain with SS, a woman of South African and British nationality who had taken a job in Hong Kong. QT’s application for a dependent visa was refused on the basis that marriage is defined in Hong Kong as the union of one man and one woman.