In a landmark verdict, a Hong Kong court ruled on Friday that a law barring foreign maids from applying for permanent residency was unconstitutional.

The verdict opens the doors of permanent settlement rights for a Filipina maid, Evangeline Banao Vallejos, who has lived in Hong Kong since 1986.

While throwing out the regulation that prevented foreign maids from applying for settlement rights, Justice Johnson Lam in the Court of First Instance said that such a law goes against the grain of the Basic Law, or the city's municipal charter.

The ruling in the case, which sparked a lively debate on the question of equal treatment of foreign maids, will now help thousands of domestic workers in the city.

According to existing regulations, all non-Chinese nationals could apply for permanent residency after working in the city for seven years. However, foreign maids were not given this privilege.

According to Al Jazeera, there are more than 300,000 foreign maids in Hong Kong, mainly from Indonesia and the Philippines. Around 120,000 of them have lived in the city for seven years or more.

However, the government could appeal the verdict. Those who criticized the court's decision to liberalize permanent residency rules say such a move will stretch the city's public health and welfare resources.

Vallejos, who has blazed a new trail for foreign maids by winning the case, applied for permanent residency in 2008. The immigration department, however, rejected the application. She applied in 2010 for a judicial review.