Get all the latest news on coronavirus and more delivered daily to your inbox. Sign up here.

A blanket ban on face masks in Hong Kong was ruled unconstitutional by a top appeals court Thursday, months after anti-government protests and at a time when much of the world is using them to combat the coronavirus.

The Hong Kong Court of Appeal partially overturned a lower court ruling, finding a ban on masks at public gatherings unconstitutional. The court, however, upheld the ban if worn at unlawful assemblies, Reuters reported.

“If the meeting and procession remain peaceful and orderly, it is difficult to see the justification for imposing a restriction on the freedom of demonstration by way of prohibition of wearing facial coverings,” the court said.

The decision comes amid the COVID-19 pandemic that has seen a worldwide surge in the wearing of face masks as governments enact containment measures -- including requiring face masks be worn outside -- to slow the spread of the virus.

Many pro-democracy demonstrators wore masks during months of protests that riled Hong Kong late last year in opposition to China's growing influence in the semi-autonomous region.

During the height of the protests, Hong Kong leader Carrie Lam enacted a measure banning face masks, which were worn by demonstrators to hide their faces from authorities and to protect themselves from tear gas, according to the news outlet.

CLICK HERE TO GET THE FOX NEWS APP

The ban was ruled unconstitutional in November 2019 and appealed by Beijing.