HONG KONG (Reuters) - Hong Kong’s Court of Appeal on Thursday ruled that a blanket government ban on face masks was unconstitutional, at a time when most Hong Kong people are wearing them in the hope of warding off the new coronavirus.

Hong Kong pro-democracy veteran Leung Kwok-hung speaks to members of the media before the Court of Appeal's ruling on the anti-mask law in Hong Kong, China April 9, 2020. REUTERS/Jessie Pang

Partially overturning a lower court’s ruling, a three-judge panel said that while the government had the right to ban the wearing of masks at unlawful assemblies, a ban on masks at legal public gatherings was unconstitutional.

In October, during the height of anti-government protests, Hong Kong leader Carrie Lam invoked colonial-era emergency powers for the first time in more than 50 years that allowed her to enact a new regulation banning face masks.

At the time, many protesters wore masks to hide their identities from the authorities and also from their employers, particularly if they had close connections to Beijing.

Protesters also wore masks to protect themselves from tear gas.

The contentious ban on masks was ruled unconstitutional by the High Court in November, a decision that riled Beijing and led to an appeal.

“If the meeting and procession remain peaceful and orderly, it is difficult to see the justification for imposing a restriction on the freedom of demonstration by way of prohibition of wearing facial coverings,” the Court of Appeal said.

Some democracy activists said the Thursday ruling created confusion and called on the government to repeal the law.

“It creates lots of fear and confusion, so there’s only one solution, I call upon Chief Executive Carrie Lam to repeal this law,” said pro-democracy lawmaker Dennis Kwok, adding that the priority now should be to focus on battling the coronavirus.

Hong Kong has had 974 cases of the coronavirus and four people have died of it in the city.

Thursday’s ruling also found that providing the police with powers to remove facial coverings was also unconstitutional.

But in a partial victory for the city government, the court said its overall right to invoke the Emergency Regulations Ordinance (ERO) was constitutional in time of “public danger”, overruling critics who said the ERO was itself unconstitutional.

The city’s Department of Justice has five days to appeal against the ruling.

Masks have long been common in Hong Kong for when people are sick, or fear getting sick in public. That has become even more pronounced this year with most of the city’s 7.4 million people putting on surgical mask in the hope of protecting themselves from the coronavirus.

Under the anti-mask law, it was illegal to wear a mask at both lawful and unlawful assemblies and offenders could be sentenced to one year in jail and a fine of HK$25,000.

People who need to wear face masks for health, religious or job-related reasons were exempt from the law, although critics of the ban said it was confusing.

Police were also given the power to order people to remove masks for identity verification. Those who refused to do so could be sentenced to six months in prison or a HK$10,000 fine.