Hong Kong's Court of Final Appeal on Wednesday recognized the marriage of a same-sex couple for immigration purposes.

The court unanimously upheld a lower court's decision stating that the same-sex partner of a British expatriate should be issued the same dependent visa that spouses and children of heterosexual foreigners receive, the AP reported.

The ruling marks a significant step for LGBT rights in the Chinese territory and former British colony., where gay and lesbian couples are not allowed to marry.

The court determined that treating same-sex spouses differently than opposite-sex spouses for immigration purposes “constituted indirect discrimination.”

The women, identified as “QT” and “SS,” were in a British civil partnership when they entered Hong Kong in 2011. QT was given only a visitor's visa, which does not permit her the right to work or study in the country.

The court said that the immigration department had “failed to justify the discriminatory treatment.”