Laurel Chor via Getty Images People protest a government ban on face masks in Central on October 4, 2019 in Hong Kong. (Photo by Laurel Chor/Getty Images)

HONG KONG (AP) — Masked protesters streamed into the streets in central Hong Kong on Friday after the city’s embattled leader invoked rarely used emergency powers to ban masks at rallies in a hardening of the government’s stance after four months of anti-government demonstrations.

Immediately defying the ban set to take effect Saturday, thousands of protesters crammed streets in the central business district shouting “Hong Kong, resist.”

Carrie Lam, Chief Executive of Hong Kong, said at an afternoon news conference that the mask ban, imposed under a colonial-era Emergency Ordinance that was last used over half a decade 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.

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.

“We must save Hong Kong, the present Hong Kong and the future Hong Kong,” she said. “We must stop the violence ... we can’t just leave the situation to get worse and worse.”

Laurel Chor via Getty Images People protest a government ban on face masks in Central on October 4, 2019 in Hong Kong. (Photo by Laurel Chor/Getty Images)

Local media reported that two activists immediately filed legal challenges in court against the mask 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’s 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 who gave his surname as Lui.

Lam wouldn’t rule out a further toughening of measures if violence continues. She said she would not resign because “stepping down is not something that will help the situation” when Hong Kong is in “a very critical state of public danger.”

Thousands of masked protesters began marching in the city’s business district and other areas before Lam spoke. The rally grew in the evening as protesters vowed they wouldn’t be intimidated. Some used metal railings and other objects to block roads and set street fires, including burning a Chinese flag.

“The Hong Kong police are also wearing their masks when they’re doing their job. And they don’t show their pass and their number,” said protester Ernest Ho. “So I will still keep my mask on everywhere.”

Face masks have become a hallmark of protesters in Hong Kong, even at peaceful marches. As the use of police tear gas has become widespread, many young protesters have worn heavier duty gear including full gas masks and goggles.

Even peaceful masked marchers cite fears they could lose jobs and be denied access to schooling, public housing and other government-funded services if identified as having taken part in demonstrations.

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.

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’s strike and last used to crush riots in 1967, gives broad powers to the city’s chief executive to implement regulations in an emergency.

“Even though the mask ban is just a small move under the Emergency Ordinance, it is a dangerous first step. 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.

Anthony Kwan via Getty Images Hong Kong Chief Executive Carrie Lam speaks during a press conference at the Central Government Complex on October 4, 2019 in Hong Kong. (Photo by Anthony Kwan/Getty Images)

Lam bristled at a suggestion that the ban nudges Hong Kong closer to the authoritarian rule imposed by the Communist Party across the rest of China. She insisted she was not acting under orders from the central government in Beijing, which she visited this week when Communist Party leaders celebrated 70 years in power on Tuesday.

The ban followed widespread violence in the city Tuesday that marred China’s National Day and included a police officer shooting a protester, the first victim of gunfire since the protests started in June over a now-shelved extradition bill. The wounded teenager was charged with attacking police and rioting.

The movement has snowballed into an anti-China campaign amid anger over what many view as Beijing’s interference in Hong Kong’s autonomy. More than 1,750 people have been detained so far.

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.

The government last month withdrew the extradition bill, widely slammed as an example of the erosion of Hong Kong’s freedom, but protesters have widened their demands to include direct elections of the city’s leaders, an independent inquiry into alleged police brutality, the unconditional release of protesters and not characterizing the protests as riots.

“Five demands, not one less!” many protesters shouted during Friday’s rallies as they held up five fingers.