Beijing has warned the US that it will take "every necessary measure" to protect its interests after a top White House advisor warned that Washington might revoke Hong Kong's special trading privileges if China enacts a tough new security law.

China plans to impose legislation on the semi-autonomous city that bans treason, subversion and sedition, officials said in response to months of massive, often-violent pro-democracy protests in the financial hub last year.

US national security advisor Robert O'Brien warned Sunday that the new law could cost the city the preferential trading status it enjoys with the United States, the world's largest economy.

But China's foreign ministry said Monday the US has "no right to criticise and interfere."

"What laws, how, and when Hong Kong SAR (Special Administrative Region) should legislate are entirely within the scope of China's sovereignty," said foreign ministry spokesman Zhao Lijian.

"If the US insists on hurting China's interests, China will have to take every necessary measure to counter and oppose this," he added.

He said Beijing had already made "stern representations to the US."

Hong Kong residents enjoy rights — including freedom of speech — unseen on the mainland, and the city has its own legal system and trade status.

Many Hong Kongers fear the proposal could spell the end of the territory's treasured freedoms, and thousands protested on Sunday against the Chinese measure despite a ban on mass gatherings introduced to combat coronavirus.

O'Brien's remarks came amid soaring tensions between Washington and Beijing — and only a day after China's foreign minister Wang Yi warned that the two countries seemed poised "at the brink of a new Cold War."

US Secretary of State Mike Pompeo said Friday the proposed law, which China's rubber-stamp legislature is expected to act on quickly, would be a "death knell for the high degree of autonomy Beijing promised for Hong Kong."

Hong Kong: nearly a year of unrest
Hong Kong (AFP) May 24, 2020 –

China's proposal for a new security law in Hong Kong has revived tensions in the semi-autonomous city after it was rocked by months of pro-democracy protests last year.

Here is a recap:

– Seven months of unrest –

Starting in June 2019, Hong Kong experiences its biggest political crisis since 1997 when Britain handed the city back to China.

Often violent, near-daily protests involving clashes with police are sparked by a draft government bill that would have allowed extradition to mainland China and its opaque judicial system.

The protests quickly snowball into a popular revolt against Beijing's rule after years of rising fears over the erosion of the city's freedoms.

Although the extradition bill is withdrawn, the government does not budge on protesters' demands for free elections, an investigation into police violence and an amnesty for the more than 8,300 people arrested over the unrest.

– Virus calm –

In January 2020 Hong Kong is one of the first places outside mainland China to report cases of the new coronavirus, after it emerged in the Chinese city of Wuhan in late 2019.

But despite its proximity to the mainland, Hong Kong only records just over 1,000 infections and four deaths.

A series of mass arrests and the measures in place to contain the pandemic usher in a period of enforced calm for the pro-democracy movement.

In mid-May Hong Kong extends anti-virus measures limiting public gatherings until June 4 — a move that means an annual vigil marking the Tiananmen Square crackdown will likely not take place for the first time in 30 years.

– Heating up again –

But tensions flare again on April 18 when Hong Kong police carry out a sweeping operation against high-profile democracy campaigners, arresting 15 activists on charges related to the 2019 protests.

Rival Hong Kong lawmakers clash on May 8 inside the city's legislature as pro-democracy politicians attempt to scupper a controversial law that bans insulting China's national anthem.

There is more chaos on May 18, when the 15 activists are charged with organising and taking part in unlawful assemblies in 2019. At the legislature, protesting pro-democracy lawmakers are dragged from the chamber by security amid scuffles between rival camps.

– Security law –

On May 22, on the first day of its rubber-stamp parliament's congress, China unveils proposals to strengthen "enforcement mechanisms" in Hong Kong.

The draft proposal will "guard against, stop and punish any separatism, subversion of the national regime, terrorist group activities and such behaviours that seriously harm national security".

An attempt by the Hong Kong government to introduce a similar law in 2003 sparked huge protests and was shelved.

The plan draws Western rebuke. US Secretary of State Mike Pompeo urges China to reconsider the "disastrous proposal", saying it would "be a death knell for the high degree of autonomy Beijing promised for Hong Kong".

On May 24, in the most intense clashes in months, thousands of pro-democracy protesters come out on the streets of the city against the law. Police fire tear gas and water cannon.

China's Foreign Minister Wang Yi says the law is "imperative" and should be imposed "without the slightest delay".