Former Deputy Defense Secretary Bob Work slammed Google employees at a recent defense conference, saying their refusal to work with the Pentagon but still work with China is creating an “enormous moral hazard to themselves.”

“The Google employees have created an enormous moral hazard to themselves,” Work said, according to a report by Breaking Defense. He added that he hoped “it’s not a canary in the coal mine” and that other tech companies do not follow suit.

This year, Google withdrew from Project Maven, a pilot Pentagon program to develop artificial intelligence to help military analysts sift through ever-growing reams of raw data being collected on the battlefield.

Three thousand of 70,000 Google employees objected on ethical grounds, arguing they did not want to help the military conduct war.

Yet, Work argued, those same Google employees are inadvertently aiding the Chinese military as it seeks to become the world’s leader in artificial intelligence by 2025.

Google is standing up a new Google AI China Center in Beijing with “several hundred China-based engineers,” Work said at the DefenseOne conference on June 26.

Due to China’s strategy of “civil-military fusion,” where every major Chinese company and university has an obligation to share information with the Chinese government, “anything that’s going on in that center is going to be used by the military,” Work said.

Work, a retired Marine, defended Project Maven, saying it could actually save lives by preventing terrorist attacks or errant strikes by U.S. forces.

“I fully agree that it might end up with us taking a shot, but it could easily save lives,” he said. “It might save 500 Americans or 500 allies or 500 innocent civilians from being attacked.”

The program, which is still in its beginning stages, is aimed at helping the U.S. military identify objects and improve its AI capabilities. It is not being used to target things on the battlefield, but someday it could.

Work argued that asking Google to teach AI to “look for things on video” was “what we considered to be the absolutely least objectionable thing” they could ask the company to do.