A government ban on demonstrators wearing face masks, aimed at helping to quell months of pro-democracy unrest in Hong Kong, is unconstitutional, the territory’s high court ruled Monday.

“The restrictions it imposes on fundamental rights … go further than is reasonably necessary … and therefore fail to meet the proportionality test,” the court said, according to a press summary.

High Court judges on Monday found the mask ban introduced under emergency legislation was “incompatible with the Basic Law,” the city’s mini-constitution.

Justices Anderson Chow Ka-ming and Godfrey Lam Wan-ho ruled in favor of the 25 pan-democrats who challenged two laws that brought the ban into effect on October 5.

The ban on face-covering came into force when the city’s unelected pro-Beijing leader invoked colonial-era legislation for the first time in more than 50 years.

The move was seen as a watershed legal moment for the city since its 1997 return by Britain to China – but has been largely symbolic.

Demonstrators – mostly wearing masks – continue to clash with police, often violently, as they press their demands for greater democracy for Hong Kong, as well as an independent inquiry into alleged brutality by the increasingly unpopular police force.

The controversial mask ban has sparked six constitutional challenges, including the present two, testing the ordinance in the courts for the first time since it was enacted in 1922.

In a 106-page judgment handed down on Monday afternoon, the judges declared the ordinance “incompatible with the Basic Law” to the extent that it empowers the chief executive to make regulations on any occasion of public danger, according to the South China Morning Post.

Reporting by AFP