A police officer was stabbed in Hong Kong on Sunday, police officials said, in what appeared to be an escalation of the street violence that has gripped the city for months, as flash-mob gatherings unfolded across town.

The gatherings, in more than half of the semiautonomous Chinese territory’s 18 districts, were the first significant unrest since Hong Kong was convulsed by violence a week earlier over opposition to a ban on face masks at public gatherings.

The unrest included attacks on the subway system and on businesses that protesters perceive to be supportive of Beijing. The police force said on Sunday that a protester had stabbed one of its officers in the neck, and that his condition was stable.

The rowdy gatherings on Sunday — coordinated via social media and encrypted messaging apps — highlighted the continuing opposition to the unpopular ban on wearing face masks and capped a momentous week in China’s relationship with the United States.