Two protesters were charged Monday with violating Hong Kong’s new ban on wearing masks at rallies, a move likely to add to a backlash that has thrown the city into deeper crisis.

An 18-year-old student and a 38-year-old unemployed woman were the first to be prosecuted under the ban, which came into force Saturday under sweeping emergency powers aimed at quashing violence in the protests for more democratic freedoms.

Detained early Saturday shortly after the ban took effect, the two were also charged with taking part in unlawful assembly, which carries a heavier penalty of up to five years in jail. A conviction under the mask ban is punishable by up to a year in prison and a fine. They were both released on bail pending trial.

Instead of deterring rioting and calming the anti-government demonstrations that have rocked the international financial hub for four months, the mask ban has led to more anger and redoubled the determination of both peaceful marchers and more radical protesters.

The protests were sparked by a proposed law that would have allowed some criminal suspects to be sent to mainland China for trial, but have since morphed into a larger anti-government movement. Protesters are upset at what they say are Beijing’s increasing influence over the former British colony, which was promised a level of autonomy when it was handed back to Chinese rule in 1997.

Tens of thousands of masked protesters marched defiantly in the city centre Sunday, but the peaceful rallies quickly degenerated into chaos at several locations as hard-liners again lobbed gasoline bombs, started fires and trashed subway stations and China-linked banks and shops. Police responded with tear gas in familiar skirmishes.

It also drew a first warning from the Chinese military after protesters pointed lasers at one of its barracks in Hong Kong. Police said rioters also attacked bystanders, including two men left unconscious after bloody beatings and a woman who took photos of rioting.

In a statement Monday, police said the “public order of the whole city is being pushed to the verge of a very dangerous situation.” The chaos has led many shops and public services to shutter and panic buying in some areas.

The city’s MTR network of subways and trains was entirely closed Saturday and partially reopened Sunday but was quickly targeted again by protesters. Most stations remained closed Monday amid fears of more protests.

Hong Kong’s High Court has rejected a second effort to invalidate the mask ban but agreed to hear later this month an application by 24 legislators against Hong Kong leader Carrie Lam’s use of the colonial-era Emergency Regulations Ordinance to impose the ban without legislative approval.

Lam has said that the mask ban will make the identification of rioters easier for police and that other measures are possible if violence continues.

Riot police officers detain anti-government protesters during a demonstration in Causeway Bay district in Hong Kong on Sunday. (Athit Perawongmeth/Reuters)

Critics fear Lam’s use of the emergency law that gives her broad powers to implement any measures she deems necessary could pave the way for more draconian moves. The law was enacted by the British in 1922 to quell a seamen’s strike and was last used in 1967 to crush riots.

Lam has said she will seek the legislature’s backing for the mask ban when it meets next on Oct. 16.

Enforcement of the ban is tricky in a city where many have worn surgical masks since a deadly respiratory disease outbreak in 2003. Both peaceful and violent demonstrators say violence is the only way for protesters to force the government to bend to clamours for full democracy and other demands.

But it sparked fears of more deadly duels after two teens were injured by gunfire from officers under attack this week. An 18-year-old protester, shot at close range by a riot officer on Tuesday, was charged with rioting and assaulting police. A 14-year-old teen, who suffered a gunshot wound to his thigh Friday night, was arrested.