China and Germany agreed to work on stopping economic cyber spying between the two nations amid mounting concern that the thousands of small- and medium-sized companies that form the backbone of German industry are ill-equipped to repel hacking attacks.

Similar no-spy agreements exist between China and the U.S. as well as the U.K., Merkel said Thursday in Beijing. Germany, the Asian nation’s biggest European trade partner, seeks such a deal “very quickly,” and China agreed, she told reporters after talks with Chinese Premier Li Keqiang.

“This is a big and important step upon which one can build,” said Sandro Gaycken, a cyber-security expert at Berlin’s European School of Management and Technology who helped prepare the deal. “China is very active in economic espionage, and Germany has been an attractive target because of the many technological innovations are happening at Mittelstand companies that traditionally have weak IT-security systems.”

China has in the past denied allegations of orchestrating cyber attacks and on Thursday said it wants to work with Germany toward greater security and openness in the sector.

“We are against cyber theft and the stealing of trade secrets,” Li said at the same event, according to a translated transcript of his remarks e-mailed by the German government. “We are protecting intellectual property.” China’s foreign ministry didn’t immediately reply to questions sent by fax.

The U.S. and China agreed on broad anti-hacking principles aimed at stopping the theft of corporate trade secrets after a meeting between Chinese President Xi Jinping and President Barack Obama in Washington last month. It came after the White House threatened economic sanctions on Chinese individuals and companies in response to a string of cyber-attacks against American businesses and government agencies.

–With assistance from Arne Delfs in Berlin and Alfred Cang in Shanghai.