Hong Kong staged a dramatic terror drill Thursday ahead of an expected visit by China’s President Xi Jinping this summer, as security tightens around the city.

Special paramilitary forces armed with heavy weaponry exchanged gunfire with police acting as terrorists, who steamed into a carnival with a van in one scenario.

A mock negotiation also took place, as did a bomb disposal in a later exercise.

Though the visits are not yet officially confirmed, China’s leaders are widely expected to preside over celebrations on July 1 marking the 20th anniversary since Hong Kong’s return from British to Chinese rule.

Police said the training, which simulated recent Islamic State group attacks in Europe, was not directly related to the festivities but it is the latest security drill ahead of Xi’s anticipated visit.

The exercises were designed to test the elite squads’ capabilities in handling several major attacks at the same time and coordination with other departments, as well as raise public alertness, police told reporters.

terror drill
Photo: HK01 screenshot, via Facebook.

“So far there is no specific intelligence to suggest that Hong Kong is likely to be a target of terrorist attacks,” a police representative said.

“However, looking at the latest global terrorist situation, we know that the patterns of terrorist attacks nowadays are hard to predict.”

terror drill
Photo: HK01 screenshot, via Facebook.

The city’s rail operator has also beefed up security measures and planned more drills ahead of July, and after a rush hour arson attack on a subway train in February that left 18 people injured.

The city is polarised between those calling for greater democracy and an establishment camp loyal to Beijing.

terror drill
Photo: HK01 screenshot, via Facebook.

Some frustrated activists are calling for Hong Kong to split from China, infuriating Beijing authorities.

YouTube video

Authorities have rejected pro-democracy protesters’ submission to begin their annual march on July 1 at their usual point in Victoria Park, which was instead reserved for a pro-Beijing group for handover celebrations.

terror drill
Photo: HK01 screenshot, via Facebook.

March organisers accused the government of stifling protest and vowed to keep pushing for the site as their rally’s starting point.

Agence France-Press (AFP) is "a leading global news agency providing fast, comprehensive and verified coverage of the events shaping our world and of the issues affecting our daily lives." HKFP relies on AFP, and its international bureaus, to cover topics we cannot. Read their Ethics Code here