As U.S. government agencies seek to partner with the private sector to thwart cyberattacks and election meddling, the top U.S. intelligence official questioned the logic of American companies who refuse to work with the U.S. government but partner with China.

Without explicitly naming Google, Director of National Intelligence Dan Coats said Oct. 18 during an event hosted by Cyberscoop that “some companies are reluctant to partner with us because they believe that it could hurt their brand name.”

“Nevertheless, some of these very same companies turn right around and pursue access and production opportunities in China,” Coats said.

Google said Oct. 8 that it would not compete for the Pentagon’s cloud contract, Joint Enterprise Defense Infrastructure, because the work could conflict with its corporate values. The company is also considering creating a censored search engine in China.

Coats was critical of that reasoning.

“If you are a U.S. company that believes you should limit your partnership with the U.S. government on national security matters because it would hurt your brand, then perhaps you should think about the harm to our overarching national security interests of pursuing greater business opportunities in a country like China, where the private sector and the state often merge into the same,” Coats said.

Google’s decision has drawn a host of critics in Washington from Bob Work, the former deputy secretary of defense, to Sen. Tom Cotton, R-Ark. The company did not respond to emailed questions.

It comes as the U.S. government aims to partner with the private sector to thwart cyberattacks and election meddling. The Department of Homeland Security opened up a cyber risk sharing center in July. Christopher Krebs, an under secretary for the department and one of the agency’s top cyber officials, met with Google and other companies in Silicon Valley this summer to discuss securing the midterm elections.

Google’s decision comes months after after it pulled out of another U.S. government contract. The Silicon Valley giant also announced earlier this year that it would not renew an agreement with the Pentagon for Project Maven, which uses artificial intelligence technology with drones. At the same time, Google is opening up an artificial intelligence center in China.

Earlier this week, Jeff Bezos, Amazon’s chief said his company would continue to work with the Pentagon. Amazon Web Services bid on the JEDI contract, which could be worth as much as $10 billion. During the WIRED25 summit Oct. 15, Bezos was critical of companies who would not work with the U.S. government.

“If big tech companies are going to turn their back on the US Department of Defense, this country is going to be in trouble.”