Hong Kong's court of appeal on Wednesday overturned a landmark ruling that opened the door for thousands of foreign maids to claim residency in the southern Chinese city.
"It must be up to the sovereign authority to decide the extent to which the status of permanent resident should be conceded to foreign nationals," Judge Andrew Cheung wrote in a 66-page judgement accepting the government's appeal.
The High Court ruled on September 30 last year that Philippine domestic worker Evangeline Banao Vallejos had the right to request permanent residency status, something that had been denied to foreign maids until then.
But the government argued that the authorities had discretionary power to decide who was eligible for residency, rejecting arguments that restrictions on maids were unconstitutional and discriminatory.
The three-judge panel on the court of appeal unanimously accepted that argument, saying the High Court could not override the government's authority to decide who can live in the city and who cannot.
The decision will come as a major blow to tens of thousands of maids who could have been eligible for residency status if the Vallejos case had been established in law.
"It is a fundamental principle in international law that a sovereign state has the power to admit, exclude and expel aliens," Cheung wrote.
Vallejos's lawyers said they would take the case -- the first of its kind in Asia -- all the way to the Court of Final Appeal, Hong Kong's highest court.
"The interpretation of the law creates a second-class citizen," counsel Mark Daly told AFP.
"We will continue on to the Court of Final Appeal until we get justice."
The government welcomed the ruling and said it would not process any residency applications from domestic helpers until the courts delivered a final determination.
"The government anticipates that the present litigation will likely proceed to the Court of Final Appeal," Security Secretary Ambrose Lee told reporters.
Rights advocates said the ruling sent the wrong message to other Asian nations that relied on poorly paid maids from less wealthy countries to toil at jobs locals no longer wanted to do.
"It's not just about staying in Hong Kong -- we don't want to be excluded," Asian Migrants' Coordinating Body spokeswoman Eni Lestari said outside court.
The group represents over 10,000 foreign maids in Hong Kong, a glittering financial and banking centre of some seven million people, including almost 300,000 foreign domestic helpers mainly from Indonesia and the Philippines.
Lestari said foreign maids should not be treated any differently to other foreigners who flock to the semi-autonomous former British colony to find work as lawyers, bankers, accountants and managers.
Most are eligible to apply for permanent residency, granting them additional rights and access to government services, once they have lived in the city for at least seven years.
"What makes us different from others? We work very hard, we support our families too," Lestari said.
"We are bound by Hong Kong immigration policies and yet they use it to exclude us, this is clear discrimination."
Some officials have warned of a deluge of permanent residency requests if the Vallejos precedent is allowed to stand. But government figures of applications from 1998 to 2011 show no significant uptick since September.
Foreign maids in Hong Kong earn a minimum wage of HK$3,740 ($480) a month and receive other benefits such as one guaranteed day off a week.
Rights rights groups say however that they still face discrimination and a lack of legal protection from abusive employers.
Many live with their employers for years and send portions of their pay back to relatives at home, providing a huge source of foreign remittances to the Philippine and Indonesian economies.