The EU said the China security law was "a matter of grave concern" and eroded Hong Kong's rights to freedom.
On Wednesday, China 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 day before, the European Union said it would limit exports of equipment and technologies to Hong Kong which could be used for surveillance in response to a security law being imposed on the country by China.
The EU said on Tuesday the new law was "a matter of grave concern" and eroded Hong Kong's rights to freedom, which were supposed to be upheld under the terms of its handover from Britain to China until 2047.
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.
He told the EU to "stop any interference in Hong Kong matters and China's internal affairs".
Beijing's security law was imposed on Hong Kong at the end of June. It criminalises terrorism, secession, subversion, and collusion with foreign forces.
Many western countries criticise the law, saying it restricts freedoms and undermines the rule of law. But EU members have found it difficult to unite on a position with China, an important trading partner.
The series of measures announced by the EU was spearheaded by France and Germany.
"If we want to maintain our values and principles in dealing with powers like China, we Europeans have to speak with one voice," said Germany's Foreign Minister Heiko Maas.
"We now have a common toolbox," he added.
The bloc said it would also hold off from any negotiations with Hong Kong and would bring in measures to support the population by granting visas and scholarships.
Hong Kong and Chinese government officials say the law is crucial for national security defences in the wake of anti-government protests over the past year.
The law would also create a national security agency in Hong Kong that could put law enforcement in the hands of Beijing.
Beijing on Tuesday announced the suspension of extradition treaties with Canada, Australia and Britain, after they suspended extradition treaties with Hong Kong over the new law.