Chinese troops came out of the barracks in Hong Kong on Saturday – not to quell protests but to help clean up.

It was a rare public appearance by the People’s Liberation Army on the streets of the semi-autonomous territory, where the local government’s inability to end more than five months of often violent protest has fuelled speculation that Beijing could deploy its troops.

Running in formation with brooms instead of rifles, they chanted in military cadence before joining street cleaners removing debris near Hong Kong Baptist University, where police fired tear gas at protesters earlier this week.

Most anti-government protesters have left Hong Kong’s universities after occupying them for about a week.

Hong Kong Protests
A volunteer medic runs past a blaze in the street near the Hong Kong Polytechnic University (Ng Han Guan/AP)

But on Saturday night, police faced off with a group that remained in and around Hong Kong Polytechnic University in an apparent attempt to flush them out.

For a city now accustomed to fierce weekend clashes between police and protesters, Hong Kong had a relatively quiet Saturday.

Small contingents of protesters harassed some of those cleaning up, and those at Polytechnic kept a major cross-harbour tunnel closed.

About 1,000 people turned out for an annual Gay Pride event in the centre of the city.

Dozens of Chinese troops, dressed in black shorts and olive drab T-shirts, came out from a nearby barracks to pick up paving stones, rocks and other obstacles that had cluttered the street and prevented traffic from flowing. Hong Kong riot police kept watch from nearby streets.

Hong Kong Protests
A statue of Sun Yat-sen, who is widely regarded as the founding father of modern China, was dressed with helmet and mask by protesters at the Hong Kong Polytechnic University (Ng Han Guan/AP)

China, which maintains a garrison of about 10,000 soldiers in Hong Kong, publicly noted several times earlier during the protests that it could deploy them, though technically it would have to be requested by Hong Kong’s government.

Doing so, however, would incur international criticism and revive memories of the army’s bloody crackdown on pro-democracy protesters at Tiananmen Square in 1989.

The Hong Kong government said it had not requested the military’s assistance in the clean-up, describing it as a voluntary community activity.

At the Polytechnic, police advanced towards the protesters with tear gas at about 10.30pm local time.

After a hiatus, police and protesters traded volleys of tear gas and petrol bombs as the clash extended past midnight.

Hong Kong Protests
Hundreds of people joined a gay pride rally in Hong Kong on Saturday afternoon (Ng Han Guan/AP)

Earlier, there were scattered incidents of protesters arguing with people clearing roadways, and in one instance, throwing a petrol bomb near City University of Hong Kong.

Protesters also massed near Hong Kong University in the evening to try to block a main road again, but they were stopped by police firing pepper-spray balls.

Now in their sixth month, the anti-government protests have grown increasingly violent even as they have shrunk in size, often causing chaos in the streets.