BEIJING — Two Canadian men detained in China since December have been formally arrested on espionage charges, the Chinese Foreign Ministry said on Thursday, a move likely to ratchet up tensions between China and Canada that broke out with the arrest of a Chinese tech executive in Vancouver.

Michael Kovrig, a former diplomat who was detained while visiting Beijing, was arrested on suspicion of “gathering state secrets and intelligence for abroad,” and Michael Spavor, a business consultant who was detained in northeastern China, was accused of “stealing and providing state secrets for abroad,” Lu Kang, a spokesman for the foreign ministry, said at a regularly scheduled news briefing.

The vague reference to unspecified overseas entities left open the question of whether the men were suspected of working for a government or for some other organization.

Mr. Lu did not provide further details and said only that the arrests had been made recently.

“Everything in China is done in accordance with law,” Mr. Lu said.