China on Wednesday slammed a decision by the European Union to limit exports of surveillance equipment to Hong Kong over concerns about a controversial new security law in the city.

The law, which was fast-tracked onto the statute books in June after months of pro-democracy protests in semi-autonomous Hong Kong, threatens life sentences for vaguely worded offences including secession and subversion of state power.

Critics say it violates the "One Country, Two Systems" arrangement that has governed Hong Kong since Britain returned the former colony to China in 1997, allowing the city freedoms unseen on the Chinese mainland.

The EU limit on exports "violates the basic international relations norm of non-interference in other countries' internal affairs", Chinese foreign ministry spokesman Wang Wenbin said Wednesday.

"China firmly opposes this and has made stern representations with the EU," he said at a regular press briefing.

Critics say Hong Kong's new national security law violates the "One Country, Two Systems" arrangement in place since Britain returned the former colony to China in 1997
Critics say Hong Kong's new national security law violates the "One Country, Two Systems" arrangement in place since Britain returned the former colony to China in 1997 AFP / Anthony WALLACE

The EU has struggled to agree on a united response to China's growing clout. Member states are divided over whether to stand up to Beijing -- a hugely important trading partner -- or try to cooperate.

But the 27 nations on Tuesday came together around a proposal from France and Germany to limit exports to Hong Kong of technology that could be used for "internal repression, the interception of internal communications or cyber-surveillance".

The bloc will also launch schemes to support the population of the former British colony, granting visas, scholarships and academic exchanges to allow for easier travel to Europe, diplomats said.

Wang on Wednesday told the EU to "stop any interference in Hong Kong matters and China's internal affairs".

The United States has responded to the security law with sanctions against Chinese officials, while countries including Canada, Australia and Britain have suspended extradition agreements with Hong Kong.

Beijing insists the law is needed to restore stability in the financial hub after prolonged political unrest.