Chief executive Carrie Lam said she had made the order under the Emergency Regulations Ordinances, a sweeping provision that grants her the ability to bypass the legislature and make any law during a time of emergency or public danger.

"We believe that the new law will create a deterrent effect against masked violent protesters and rioters, and will assist the police in its law enforcement," Lam said.

But as soon as the law was announced masked demonstrators built barricades in the heart of Hong Kong's commercial district and began holding flash-mob rallies in multiple districts.

The largest impromptu rally on Friday broke out in Central, where many blue-chip international firms are based, as thousands of protesters blocked roads, erected barricades and built street fires.

At one point a banner celebrating 70 years of Chinese Communist Party rule was torn down and torched.

Online forums used by protesters also filled with anger and vows to hit the streets over the upcoming three-day weekend.

"Youngsters are risking their lives, they don't mind being jailed for 10 years, so wearing masks is not a problem," a 34-year-old office worker wearing a surgical mask, who gave her first name as Mary, told AFP.

Critics said the move was a major step towards authoritarianism for Hong Kong, which has been governed by China under a "one country, two systems" framework since British colonial rule ended in 1997.

"This is a watershed. This is a Rubicon," pro-democracy lawmaker Claudia Mo told AFP.

"And I'm worried this could be just a starter. More draconian bans in the name of law could be lurking around the corner."

Prominent democracy activist Joshua Wong said the law "marks the beginning of the end of Hong Kong".

"It is ironic that a colonial-era weapon is being used by the Hong Kong government and the Chinese Communist Party," he told AFP.

The last time the law was invoked was during the 1967 riots -- a period where more than 50 people were killed in a year-long leftist bombing and murder spree.

- Months of unrest -

Hong Kong's protests were ignited by a now-scrapped plan to allow extraditions to the mainland, which fuelled fears of an erosion of liberties promised under "one country, two systems".

After Beijing and local leaders took a hardline, the demonstrations snowballed into a wider movement calling for more democratic freedoms and police accountability.

Protesters have used face masks to avoid identification and respirators to protect themselves from tear gas.

The ban came after Hong Kong was rocked by the worst violence of the year on Tuesday, the same day China celebrated 70 years of Communist Party rule.