The government cannot simply rely on a United Nations agency to decide whether someone is a refugee and must assess the cases independently and fairly, the top court ruled yesterday.
The screening system is now expected to be rewritten after five judges of the Court of Final Appeal unanimously allowed a challenge by three African men.
The government said the ruling would not affect the city's policy of not granting asylum to anyone. Instead, people granted refugee status in Hong Kong are resettled elsewhere.
The court ruling says the director of immigration's decisions to deport refugee claimants must be made according to high standards of fairness, and be subject to judicial review.
Patricia Ho, the lawyer representing the three challengers, said: "I am very excited." She said that her three clients were also very happy, adding: "It's good news, not only for myself but for the entire asylum-seekers community."
Currently, the Immigration Department screens people arriving in Hong Kong who claim to be escaping torture, while the UN High Commissioner for Refugees screens refugee claims. This two-pronged approach has been criticised as time-consuming and open to abuse.
Although the judgment did not mention how the government should be vetting the cases, Ho and other advocates expected the role of the UN agency to fade.
"Understanding UNHCR's constraints in its finance and manpower, it is quite unlikely that it would duplicate the job if the government was doing it already," Ho said.
Non-permanent judge Mr Justice Anthony Mason said in the court ruling that it was not right for the immigration director to simply rely on the UNHCR. "There are very strong reasons for concluding that the director has either failed to apply his mind independently to the correctness of the determinations made by the UNHCR, or he has done so in a way that falls short of the anxious scrutiny and high standards of fairness," he said.
Cosmo Beatson, executive director of Vision First, which advocates refugees' rights, said agency decisions were immune from legal challenges and the success rate for claims was low.
He hoped the estimated 1,000 asylum seekers it had rejected but who were still fighting to stay in Hong Kong would submit their cases again.
"This brings justice and hope to those seeking asylum in Hong Kong who, until today, have had to rely exclusively on the arbitrary decisions of UNHCR," he said.
He called on the government to combine vetting procedures for torture and refugee claimants. He said this would speed up the process and prevent economic migrants from buying time in the city by first applying for one status and, when that failed, then applying for the other.
Mr Justice Kemal Bokhary said in the judgment a combined system would be "one of the choices open to the executive".
Annie Lin, of equal-rights campaign group the Society for Community Organisation, also welcomed the ruling. She added that she hoped the UNHCR would continue to help resettle recognised refugees.
Last night, Bawah, an African whose refugee claim had been rejected, said he would definitely now apply to the government. "I need justice. I want my case to be assessed with humanity."
Spokesmen for both the Security Bureau and the Immigration Department said the government would be studying the judgment and seeking legal advice on the way forward.
A UNHCR spokesman welcomed the court ruling, but would not say if it would keep taking cases or pass its current caseload - about 900 claims - to the government. About 100 refugees are awaiting resettlement.