Justice Michael Hartmann ruled that the ICAC could have used less intrusive measures in probing the leak of a witness' name, according to Agence France Presse.
The anti-corruption agency also raided Apple Daily, Oriental Daily News, The Sun, Hong Kong Economic Journal, Ta Kung Pao and the South China Morning Post. Officers subjected journalists to extensive questioning, searched computers and seized material from newspaper offices, according to local news reports.
Sing Tao was the first of the newspapers to take legal action against the anti-corruption agency. In setting aside the search warrant, the court also ordered the return of property seized from Sing Tao.
"CPJ welcomes this court decision, but damage has already been done by conducting raids that had a chilling effect on journalism in Hong Kong," CPJ Executive Director Ann Cooper said. "We hope the ICAC will take note of this decision and refrain from such disproportionate measures in the future."
The ICAC has defended its actions as part of an investigation of Witness Protection Ordinance violations, punishable by ten years' imprisonment. The Justice Department has not decided whether to appeal the recent court decision, according to a spokesperson quoted in news reports.