Mrs. Lam emphasized repeatedly at a news conference that she was not declaring an emergency, but was acting under a provision in the territory’s colonial-era law that allows the issuance of regulations in response to “a state of serious danger.”

“We are particularly concerned that many students are participating” in violent protests, “jeopardizing their safety and even their future,” she said. “As a responsible government, we have a duty to use all available means to stop the escalating violence and restore calmness in society.”

The ban on face masks will be punishable by up to one year in jail and a fine. It will apply to public gatherings of more than few dozen people. But enforcing the ban could prove difficult given their near ubiquity in the movement. Face masks are a common feature among the crowds of protesters, both for security and safety.

Many protesters wear gas masks and respirators, as do first aid responders and journalists, to protect themselves from tear gas that the police deploy to disperse crowds that engage in violence. Some wear them to protect their identity, fearful they will be captured in photos and by surveillance equipment, then targeted for retaliation.

Few people attend mass gatherings without one, even during peaceful marches and demonstrations. When Mrs. Lam held her first town hall with residents last week, many members of the audience who confronted her with difficult questions wore masks.

But the face masks, and the anonymity they provide, have given cover to more violent protesters, who have beaten police officers and vandalized property. Undercover police officers have also used masks to disguise themselves as protesters and make arrests.