Leader Carrie Lam said at an afternoon news conference that the mask ban targets violent protesters and will be an effective deterrent to radical behavior.

Challenging the mask ban set to take effect from Saturday, protesters crammed streets in the central business district and other areas.

Leader Carrie Lam said at an afternoon news conference that the mask ban, imposed under a colonial-era Emergency Ordinance that was last used over half a century ago, targets violent protesters and rioters and will be an effective deterrent to radical behavior.

The ban applies to all public gatherings, both unauthorized and those approved by police.

Ms. Lam stressed it doesn’t mean the semi-autonomous Chinese territory is in a state of emergency. She said she would go to the legislature later to get legal backing for the rule.

Two activists immediately filed legal challenges in court on grounds that the mask ban will instill fear and curtail freedom of speech and assembly. The High Court was hearing a bid late Friday to halt the ban.

The ban makes the wearing of full or partial face coverings, including face paint, at public gatherings punishable by one year in jail.

A six-month jail term could be imposed on people who refuse a police officer order to remove a face covering for identification.

Masks will be permitted for legitimate need,when their wearers can prove that they need them for work, health or religious reasons.

“Will they arrest 100,000 people on the street? The government is trying to intimidate us but at this moment, I don’t think the people will be scared,” said a protester.

Thousands of masked protesters began marching in the city business district and other areas before Ms. Lam spoke. The rally grew in the evening as protesters vowed they would not be intimidated. Some used metal railings to block roads downtown, vandalized subway stations and set street fires, including burning a Chinese flag. Some malls and subway stations were shut.

Face masks have become a hallmark of protesters in Hong Kong, even at peaceful marches, amid fears of retribution at work or of be denied access to schooling, public housing and other government-funded services. Some young protesters also wear full gas masks and goggles to protect against police tear gas.

Many also are concerned their identities could be shared with the massive state-security apparatus that helps keep the Communist Party in power across the border in mainland China, where high-tech surveillance including facial recognition technology is ubiquitous.

‘Dangerous precedent’

Analysts said the use of the Emergency Ordinance set a dangerous precedent. The law, a relic of British rule enacted in 1922 to quell a seamen strike and last used to crush riots in 1967, gives broad powers to the city chief executive to implement regulations in an emergency.

If the anti-mask legislation proves to be ineffective, it could lead the way to more draconian measures such as a curfew and other infringement of civil liberties, said Willy Lam, adjunct professor at the Chinese University.

Activists and many legislators have warned the mask ban could be counterproductive, impractical and difficult to enforce in a city bubbling with anger and where tens of thousands have often defied police bans on rallies.