Hong Kong told the United States to keep out of the debate over national security legislation being imposed by China, and warned that withdrawal of the financial hub's special status under US law could backfire on the US economy.

US President Donald Trump is due to announce later today his response to the Chinese parliament's advancement this week of security legislation for Hong Kong, which many lawyers, diplomats and investors fear could erode the city's freedoms.

The former British colony has been racked by civil unrest amid fears Beijing is curbing the high degree of autonomy it has enjoyed under a "one country, two systems" formula adopted when it returned to Chinese rule in 1997.

"Any sanctions are a double-edged sword that will not only harm the interests of Hong Kong but also significantly those of the US," Hong Kong's pro-Chinese government said late today.

From 2009 to 2018, the US trade surplus of $297bn with Hong Kong was the biggest among all Washington's trading partners, and 1,300 US firms were based in the city, it said.

The Chinese government says the new legislation, likely to come into force before September, will tackle secession, subversion, terrorism and foreign interference in the city. It could also see Chinese intelligence agencies set up bases in Hong Kong.

In the latest assertion of Beijing's authority over the territory, China's Ministry of Public Security (MPS) said it would "direct and support Hong Kong police to stop violence and restore order".

The city's police have been independent from China and the MPS has no enforcement powers in the city.

Hong Kong publishing tycoon and democracy activist Jimmy Lai said he would fight to the last against Beijing's imposition of national security laws. European Union governments expressed "grave concern" over China's move.

As anti-government tensions flared this week, riot police fired pepper pellets to disperse thousands of protesters in the city's first major unrest since demonstrations paralysed it for months last year. There had been a lull, partly as a result of the coronavirus outbreak this year.

Hong Kong protests

Chinese authorities and Hong Kong's government say the legislation poses no threat to the city's autonomy and the interests of foreign investors will be preserved.

The US and Britain have raised China's plan at the UN Security Council, prompting China and Russia to criticise the US for excessive use of force against black people.

The 15-member council informally discussed Hong Kong in a closed virtual meeting after China opposed a US call on Wednesday for a formal open council meeting, arguing that it was not an issue of international peace and security.

"The free world must stand with the people of Hong Kong," US Ambassador Kelly Craft posted on Twitter before the council discussion.

"This legislation risks curtailing the freedoms that China has undertaken to uphold as a matter of international law," acting British UN Ambassador Jonathan Allen said after the council discussion.

"We are also extremely concerned that ... it will exacerbate the existing deep divisions in Hong Kong."

Diplomats said Russia and China responded during the council discussion by criticising the United States over the Minneapolis killing of an unarmed black man - seen on video gasping for breath while a white police officer knelt on his neck - and its handling of growing unrest.

"Why US denies China's right to restore peace & order in Hong Kong while brutally dispersing crowds at home?" Russia' sDeputy U.N. Ambassador Dmitry Polyanskiy posted on Twitter after the council discussion.

China's UN Ambassador Zhang Jun said in a statement after the meeting that the US abd Britain should "mind their own business," adding that: "Any attempt to use Hong Kong to interfere in China's internal matters is doomed to fail."