A Hong Kong court has rejected a challenge to an emergency law criminalising protesters wearing face masks as democracy activists hit the streets again in defiance of the ban despite half the city's subway stations remaining closed.

Thousands of protesters have staged unsanctioned flashmob rallies across the strife-torn city - some vandalising subway stations and shops - after Hong Kong's leader outlawed face coverings at protests, invoking colonial-era emergency powers not used for half a century.

Pro-democracy politicians went to the High Court seeking an emergency injunction against the ban, arguing the emergency powers bypassed the legislature and contravened the city's mini-constitution.

But a senior judge dismissed their injunction demand.

Protesters wearing Guy Fawkes masks take part in Hong Kong protest

Large crowds then marched through torrential rain in unsanctioned rallies on both sides of Victoria Harbour while police battled protesters in multiple locations, plunging the finance hub into chaos once more.

A taxi driver was beaten in the district of Sham Shui Po after he drove into a crowd that had surrounded his car.

"Two girls were hit by the car and one girl was trapped between the car and a shop," an eyewitness told AFP, adding the crowd managed to push the car off the wounded woman.

An AFP photographer on scene saw volunteer medics treating both the driver and the two women before paramedics and police arrived. Protesters had smashed up the taxi. 

Shortly before a crowd ransacked nearby government offices.

After four months of huge and increasingly violent protests, the city's unelected pro-Chinese leader Carrie Lam invoked a sweeping colonial-era law on Friday allowing her to make "any regulations whatsoever" during a time of public danger.

She used it to ban masks - which protesters have used to hide their identity or protect from tear gas - and warned she would use the powers to make new regulations if the unrest did not abate.

The move was welcomed by government supporters and Beijing.

But opponents and protesters saw it as the start of a slippery slope tipping the international finance hub into authoritarianism.

"I would say this is one of the most important constitutional cases in the history of Hong Kong," politician Dennis Kwok told reporters before the ruling.

"If this emergency law just gets a pass just like that Hong Kong will be deemed into a very black hole," he added, previously likening Ms Lam to the autocratic English monarch Henry VIII.

Hong Kong has been battered a summer of rage as widespread public anger seethes over Chinese rule and the police response to protests.

The rallies were ignited by a now-scrapped plan to allow extraditions to the mainland, which fuelled fears of an erosion of liberties promised under the 50-year "one country, two systems" model China agreed ahead of the 1997 handover by Britain.

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

Ms Lam has refused major concessions but struggled to come up with any political solution, leaving police and demonstrators to fight increasingly violent battles as the city tips into recession.

The worst clashes to date erupted on Tuesday as China celebrated 70 years of Communist Party rule, with a teenager shot and wounded by police as he attacked an officer.

A 14-year-old boy was then shot and wounded Friday night when a plainclothes police officer, who was surrounded by a mob of protesters throwing petrol bombs, fired his sidearm.

That night, masked protesters went on a rampage in dozens of locations, trashing subway stations and businesses with mainland China ties.

The city's subway system - which carries four million people daily - was shut down entirely Friday night and throughout Saturday, bringing much of the metropolis to a halt.

Major supermarket chains and malls announced they were closing, leading to long lines and panic buying.

Thousands of masked protesters still came out onto the streets throughout yesterday despite the mask ban and transport gridlock, although the crowds were smaller than recent rallies.

Today, the subway operator said 45 stations would open but 48 remained shuttered, many of them in the heart of the city's main tourist districts as well as those areas hit hardest by the protests and vandalism.