The High Court of Hong Kong has ruled that an emergency law introduced by the government to ban protesters from wearing masks in public is 'unconstitutional'.

The law went into effect last month after the government invoked colonial-era emergency powers to curb escalating violence sparked by ongoing anti-government demonstrations.

The court claimed that the legislation 'goes further than necessary' to restrict fundamental human rights.

Police have agreed to stop enforcing the law immediately.

The High Court of Hong Kong ruled that the anti-mask law, which was passed by the city's government on October 4, 'goes further than necessary' to restrict fundamental human rights

The ruling came after a group of 24 pan-democrats submitted a petition to the court to challenge the legitimacy of the anti-mask law as well as The Emergency Regulations Ordinance that backs it.

The decision was handed down today in a 106-page document.

The High Court also declared that the emergency ordinance was 'incompatible with the Basic Law' because it gave the city's Chief Executive power to pass laws and regulations 'on any occasion of public danger'.

The Basic Law is Hong Kong's mini-constitution which governs its relations with Beijing.

The court did not rule whether or not the ordinance was 'unconstitutional'.

The ordinance gives broad powers to the city's chief executive to implement regulations in an emergency. A relic of British rule, it was enacted in 1922 to quell a seamen's strike and was last used to crush riots in 1967.

The court said it would have another hearing on Wednesday to decide on the appropriate relief and legal costs, which means the anti-mask law has not been officially struck down.

The anti-mask law was introduced after the city's Chief Executive Carrie Lam (pictured) and her government invoked colonial-era emergency law in a bid to quash the city's protests

The ruling came after the city was rocked by another weekend of violence. Pictured, police detain protesters amid clouds of tear gas at the Hong Kong Polytechnic University today

The anti-mask law has sparked further rage among the city's protesters since it went into effect on October 5.

Tens of thousands of people have since staged demonstrations still having their faces covered in defiance of the law.

The ruling came as the city was rocked by another weekend of violence as police clashed with hard-core demonstrators who had barricaded themselves into a university campus.

More than 4,000 people have been detained in connection to the unrest since it erupted at the beginning of June, and 39.3 per cent of the detainees are students. Pictured, police detain a protester near the Hong Kong Polytechnic University in Hong Kong on Monday

The demonstrations were initially sparked by a proposed law that would allow some criminal suspects to be sent to the mainland China to stand trial, but have morphed into a wider movement that calls for government reforms and universal suffrage, among others.

Police fired tear gas and rubber bullets at protesters attempting to flee the Hong Kong Polytechnic University on Monday morning after a night of confrontations that saw activists hurl fire bombs at officers as they tried to storm in.

Demonstrators spent Sunday night attempting to stop police getting on to the campus of Hong Kong Polytechnic University, but as day dawned on Monday many of the exhausted activists were trying to escape.

Police last week warned that activists had turned the city's Chinese University into a 'weapon factory' after they shot police with flaming arrows from bows and built huge catapults to launch petrol bombs.