Three German citizens who are believed to have gathered sensitive naval data and obtained a high-powered laser on behalf of the Chinese security services were arrested on Monday, prosecutors said, underscoring the fragile nature of the relationship between the two countries.

A man identified as Thomas R., in keeping with German privacy rules, acted as an “agent” for the Chinese Ministry of State Security, and engaged two others — a married couple identified as Herwig and Ina F. — who ran an engineering company in Düsseldorf, the authorities said.

The arrests come at an awkward time for the German government: Chancellor Olaf Scholz recently spent three days in China as the countries signed several bilateral trade agreements, but Germany is also vigilant to the threat posed by China.

“​​We are aware of the considerable danger posed by Chinese espionage to business, industry and science,” said Nancy Faeser, the German minister of the interior. “We are looking very closely at these risks and threats and have issued clear warnings and raised awareness so that protective measures are increased everywhere,” she added.

Separately, the British authorities said in a statement on Monday that two men had been charged with violating the Official Secrets Act after allegedly sharing information with China that could be “useful to an enemy.”

London’s Metropolitan Police named the men as Christopher Berry, 32, from Witney, Oxfordshire, and Christopher Cash, 29, from London. Mr. Cash, a parliamentary researcher with links to the governing Conservative Party, was arrested last year on suspicion of working for the Chinese government.

“This has been an extremely complex investigation into what are very serious allegations,” the police statement said, adding that the two men had been bailed to appear at Westminster Magistrates’ Court on Friday. Officials have not indicated that the German and British cases are connected.

The threat to Germany was made clear last week, when Volkswagen confirmed that Chinese hackers in a separate incident had stolen an estimated 19,000 sensitive documents from the automaker over a period of four years, starting in 2010. Volkswagen is one of the biggest German companies.

Roughly 97 billion euros, or about $103 billion, of German products were sold in China last year, making it Germany’s fourth biggest export market and one that is especially important for the powerful auto sector.

Experts are increasingly warning of China’s aggressive trade practices. Last year, the German government released a national strategy paper focusing on China, calling the trading partner a “systemic rival.”

The arrests came as the police searched the homes and workplaces of the three suspects in Düsseldorf and in Bad Homburg, in the western part of the country.

According to the authorities, Herwig and Ina F. used their company, which had previously worked on projects in China, to establish a formal research partnership with an unidentified German research university.

Under the guise of working for a legitimate business partner, which the authorities said was a front company for China’s Ministry of State Security, the couple then commissioned a study looking at the state of modern developments of certain machine parts which are crucial in developing high-powered ship motors, such as those used in navy ships.

The couple also used their company to buy a high-powered dual-use laser, which they exported to China without the required export permit.

“Anyone who works for foreign intelligence services in Germany and illegally exports potentially militarily useful material must expect a harsh response from our constitutional state,” Marco Buschmann, Germany’s minister of justice, said after the arrests.

There was no public comment from the Chinese authorities.

When the three suspects were arrested, they had been working on new research projects that would have benefited the Chinese Navy, the federal prosecutor said. The group had been working for China since at least June 2022, it added.

Stephen Castle contributed reporting from London.

world