The Hong Kong government has won an appeal against a ruling that could have allowed foreign domestic helpers to apply for residency in the city.
In September, the High Court said excluding maids from a rule allowing foreigners to settle in the city after seven years was unconstitutional.
The government appealed, fearing the ruling could lead to more than 100,000 foreign maids winning residency rights.
The case centred on Evangeline Banao Vallejos, a maid from the Philippines.
Ms Vallejos had lived in Hong Kong since 1986, working for the same family.
The case had sparked widespread debate about the rights and working conditions of Hong Kong's 300,000 domestic workers, who mainly come from the Philippines and Indonesia.
After the initial ruling, thousands of Hong Kong citizens marched to protest against the strain granting residency to maids could place on public services and the job market.
Delores Balladares from the Asian Migrants Co-ordinating Body, which represents domestic helpers' interests, said they were very disappointed by the decision.
"It legalises discrimination against migrant workers," she told BBC News.
Ms Vallejos can still take her case to Hong Kong's Court of Final Appeal.