He also argued in the blog post that “to withdraw from this market is to reduce our opportunity to engage in the public debate about how new technologies can best be used in a responsible way.”

“We are not going to withdraw from the future,” he said.

Mr. Smith’s comments stood in sharp contrast to statements by Google this month. When the company dropped out of the competition for the JEDI cloud computing contract, officials said they “couldn’t be assured that it would align with our A.I. principles,” a reference to a set of principles issued in June in which the company vowed not to design artificial intelligence products that would be used to harm people, or for surveillance or armaments. The contract is believed to amount to about $10 billion over a decade, but the shape of cloud computing that far into the future is hard to predict.

Some industry experts saw Google’s statement as an effort to gain political credit for backing out of a competition it was unlikely to win. Unlike Amazon and Microsoft, Google is missing some of the government certifications it would need to provide the software to the military.

Microsoft is believed to have a good shot, in part because President Trump has made no secret of his distaste for Jeff Bezos, Amazon’s founder and the owner of The Washington Post. But even as Mr. Trump frequently dismisses the “Amazon Washington Post,” Amazon is considered the front-runner for the contract, in large part because of the company’s experience in building the C.I.A.’s cloud computing ability over the last five years. In an analysis published in June, Deutsche Bank Research concluded that Amazon “is best positioned to win the lion’s share of the JEDI contract” and that Microsoft was the “main challenger.”

Culturally, Google and Microsoft are far different; while some Microsoft employees have expressed unhappiness with the company’s government contracts, most recently with Immigration and Customs Enforcement, the protests among Google engineers and other employees were far more intense and far more public.

Microsoft has been far more willing, however, to challenge the government. It went to court to try to keep the United States from being able to subpoena Microsoft for the emails or other records of customers whose data was stored abroad. (The suit was rendered moot by federal legislation.) It has been pressing for a “digital Geneva Convention” that would, like the traditional Geneva Convention, wall off certain civilian targets. The United States government has resisted the idea so far, not wanting to limit a president’s options to use cyberweapons against power grids or other targets on which civilians depend.

“We can’t control how the U.S. military uses our technology once we give it to them,” Mr. Smith argued. “But the military is subject to civilian control. And we believe we will have an opportunity to influence those discussions — but it’s not up to us.”