Police fire from the Mongkok police station toward protesters after they marched from the Tsim Sha Tsui district to Mongkok in Hong Kong on October 6, 2019.

Chinese soldiers issued a warning to Hong Kong protesters on Sunday who shone lasers at their barracks in the city, in the first direct interaction with mainland military forces in four months of anti-government demonstrations.

The People's Liberation Army (PLA) garrison in Kowloon district warned a crowd of a few hundred protesters they could be arrested for targeting its troops and barracks walls with laser lights.

One officer shouted through a loudhailer in broken Cantonese — the main language of Hong Kong — "Bear consequences for your actions."

The stand-off with the PLA came after rallies attended by tens of thousands of protesters earlier on Sunday ended in violent clashes in several locations. Police fired tear gas and baton-charged the crowds, while some demonstrators threw bricks and petrol bombs at police as night fell.

Protesters concealed their faces in defiance of colonial-era emergency laws invoked by the authorities on Friday, which banned face masks. Protesters face a maximum of one year in jail for breaking the mask ban.

Police made their first arrests under the new rules, detaining scores of people. Officers tied their wrists with cable and unmasked their faces before placing them on buses. Some protesters lay in foetal positions on the ground, their wrists tied behind their backs, after being subdued with pepper spray and batons.

"The anti-mask law just fuels our anger and more will people come on to the street," Lee, a university student wearing a blue mask, said on Sunday, as he marched on Hong Kong island.

"We are not afraid of the new law, we will continue fighting. We will fight for righteousness. I put on the mask to tell the government that I'm not afraid of tyranny."