German Chancellor Angela Merkel lauded an agreement on cybersecurity reached with China as she wrapped up her three-day visit to the country on Tuesday.
The two countries had agreed that neither side would engage in business espionage "for their companies or commercial sectors" or "knowingly support" such activities.
A control mechanism is to be set up to monitor possible incidents.
The German side called the deal "an important political signal," after some dithering on the part of the Chinese.
The written agreement goes above and beyond existing agreements between China and the US and Britain respectively.
Merkel had insisted repeatedly that cyber security and the protection against hackers was key for the so-called Industry 4.0 cooperation on digitally connected production processes.
The German chancellor had concluded her China visit with a trip to a BMW auto plant in the north-eastern city of Shenyang.
"I believe this trip strengthened Sino-German cooperation on one hand, without sweeping differences under the rug," Merkel told reporters Tuesday evening.
"I also wanted to show the benefits of our small- and medium-sized companies doing business in China.
"However, competition is getting tougher because Chinese people also want to advance and want to produce their own products," Merkel said.
The chancellor's visit came amid concerns over slowing demand for German exports worldwide and a shadow cast over the nation's auto industry following the Volkswagen emissions scandal.
But China, as the world's biggest car market, remains the most important driver of business growth for leading German automakers.
Germany's luxury carmakers posted robust global sales in May thanks to growing demand in Europe and China.
BMW joined rivals Mercedes Benz and Audi last week to announce record sales in May, with sales of its core BMW brand and its compact urban Mini hitting 198,354 vehicles last month, a rise of 5.3 per cent from a year earlier.
Figures from Daimler showed worldwide annual sales of its flagship Mercedes Benz brand rising sharply by 12.9 per cent to 170,625 in May following the launch of its new E-class model in April.
Helping to power ahead Mercedes sales was a 38.9-per-cent surge in demand for the company's luxury saloons in China.
The chancellor earlier met with Chinese President Xi Jinping in Beijing on Monday after high-level consultations on trade worries over a glut of Chinese steel exports.
Her Sino-German government consultations with Chinese Premier Li Keqiang - the fourth during Merkel's tenure - had focused on an ongoing trade conflict over Europe's refusal to classify China as a market economy.
Merkel said Germany would act as a mediator in the issue and called for calm.
She also addressed China's territorial disputes in the South China Sea. Both delegations acknowledged that the disputes should be resolved peacefully.
China has overlapping claims with neighbours, including Vietnam, the Philippines, Malaysia and Taiwan.