China’s military has released a slick propaganda video showing a drill of armed troops quelling a protest in Hong Kong, in a thinly veiled warning to the city’s pro-democracy movement.

The video, posted to social media on Wednesday by the Chinese People’s Liberation Army (PLA) garrison in Hong Kong, has a caption in which the military declares it has the “confidence” and “capabilities” to maintain security in the semi-autonomous southern Chinese city.

The three-minute video showcases the PLA’s tanks, helicopter gunfire, rocket launchers and other military hardware in action in Hong Kong, as well as heavily armed troops performing an anti-terrorism drill.

It also features an “anti-riot” drill in which armed soldiers, armoured personnel carriers and water cannons are used to disperse a crowd of protesters.

“All consequences are at your own risk,” a soldier yells into a loudspeaker at the start of the drill in Cantonese, the language spoken in Hong Kong rather than the Mandarin of mainland China.

PLA troops are then seen wearing helmets, carrying long shields, marching with batons, laying out barbed-wire barricades and pointing assault rifles.

An officer is also seen holding a red flag that reads: “Warning, stop charging or we use force”.

The drill ends with armed troops escorting protesters, who have their arms tied behind their backs, being led to areas designated by banners as “detention points”.

The release of the video came on the same day dozens of people appeared in court in Hong Kong after being charged with “rioting” for their alleged involvement in an anti-government protest over the weekend.

The unrest began nearly two months ago when masses of people took to the streets to stop a government effort to introduce a law that would have allowed extraditions to mainland China.

The protests evolved into a people power movement for democratic reforms and an end to eroding freedoms, in the most significant challenge to Beijing’s rule since the city’s handover from Britain in 1997.

Beijing had largely left the city’s government to deal with the unrest.

Although on Tuesday it stepped up its rhetoric with a rare press conference from the spokesman of the cabinet-level Hong Kong and Macau Affairs Office.

“No civilised society or rule of law society will tolerate rampant violence,” the spokesman, Yang Guang, told reporters in Beijing.

Thousands of PLA troops have been based at the Hong Kong garrison since the handover.

The caption to its online video posted on Wednesday reinforced its core mission.

“We are… confident and capable of firmly maintaining national sovereignty, safety, development interests and maintaining Hong Kong’s prosperity and stability in the long run,” it said.