SAN FRANCISCO — The Department of Defense on Friday awarded a $10 billion technology contract to Microsoft, in what was a closely scrutinized contest after President Trump said he might intervene in the hard-fought commercial battle.
The 10-year contract for the Joint Enterprise Defense Infrastructure, known by the cinematic acronym JEDI, had set off a showdown among Amazon, Microsoft, IBM, Oracle and Google. Intended to transform and modernize the military’s cloud computing systems, the contract is considered more important than its size because of its centrality to new forms of war. Much of the military operates on 1980s and 1990s computer systems, and the Pentagon has spent billions of dollars trying to make them talk to one another.
The decision was a surprise because Amazon had been considered a front-runner to win the contract. But that was before Mr. Trump began his criticisms of Jeff Bezos, the founder of Amazon and, for the past several years, the owner of The Washington Post — a news organization the president refers to as the “Amazon Washington Post.”
A speechwriter for former Defense Secretary Jim Mattis, who over time became an enthusiast of moving Pentagon operations to the cloud, alleged in a book scheduled for publication next week that Mr. Trump had wanted to “screw” Amazon and give the contract to another company. In public, Mr. Trump said there were other “great companies” he wanted to make sure had a chance at the contract.
The issue quickly became radioactive at the Pentagon. The new defense secretary, Mark T. Esper, at first said he wanted to take several months to review the issue and then, a few days ago, recused himself from the bidding. He said he could not participate because his son worked for another competitor for the contract.
As recently as this month, the betting was that Microsoft would, at most, get only part of the contract — and that the Pentagon, like many companies, would use multiple suppliers for its cloud services. Microsoft was considered in the lead for other government cloud programs, including an intelligence contract. Its Azure cloud program is considered a worthy competitor, but only recently has Microsoft opened enough classified server facilities to be able to handle data on the scale of the Pentagon contract.
“This contract will address critical and urgent unmet warfighter requirements for modern cloud infrastructure at all three classification levels delivered out to the tactical edge,” the Defense Department said in a statement on Friday.
Microsoft did not immediately have a comment. Amazon, which calls its cloud platform Amazon Web Services, or AWS, said in a statement that it was surprised by the decision.
“AWS is the clear leader in cloud computing, and a detailed assessment purely on the comparative offerings clearly led to a different conclusion,” Drew Herdener, a spokesman for Amazon, said. “We remain deeply committed to continuing to innovate for the new digital battlefield where security, efficiency, resiliency, and scalability of resources can be the difference between success and failure.”
Price Floyd, a former head of public affairs at the Pentagon who consulted briefly for Amazon, said he thought Mr. Trump’s vocal criticism of Amazon would give it ample grounds to protest the award to Microsoft.
“He’s the commander in chief, and he hasn’t been subtle about his hostility toward Amazon,” Mr. Floyd said.
The concept of unifying information in the cloud has obvious benefits for the Pentagon as war fighters move to greater use of remote sensors, semiautonomous weapons and ultimately artificial intelligence. It is particularly crucial at a moment that United States Cyber Command has been elevated to a full combat command, equivalent to Central Command, which runs operations in the Middle East, or Northern Command, which defends the continental United States.
But some critics argued that such a large contract should not be awarded to any one technology company, while proponents said using a single provider would protect war fighters by eliminating glitches in military systems and streamlining communications.
The initial reaction on Friday from some lawmakers was positive, mostly because the long-delayed contract had finally been issued.
Representative Jim Langevin, a Rhode Island Democrat who has immersed himself in cyber issues, suggested that the military was finally catching up with private industry.
“Advanced general-purpose cloud is the industry norm, and it’s past time the Department of Defense had access to these capabilities,” said Mr. Langevin, the chairman of the Armed Services Subcommittee on Intelligence and Emerging Threats and Capabilities. “I look forward to continuing to use my position in Congress to increase access to next-generation technologies that support our war fighters.”
Amazon, Microsoft, IBM, Oracle and Google began battling for the JEDI contract more than a year ago. Google dropped out last October without submitting a formal bid, saying the military work conflicted with its principles for the ethical use of artificial intelligence.
In April, the Pentagon said only Amazon and Microsoft met its technical requirements for fulfilling the contract. The decision prompted a legal challenge from Oracle, which alleged that Amazon had biased the process in its favor by tapping Defense Department employees who worked on the bidding process to work at Amazon.
In August, the Defense Department’s inspector general announced that it had “assembled a multidisciplinary team of auditors, investigators, and attorneys to review matters related to the Joint Enterprise Defense Infrastructure cloud program that were referred to us by members of Congress and through the DoD hotline,” which provides tips of abuse.
But while that was underway, Mr. Trump raised his objections. The process froze, and Pentagon officials said time was being wasted — which would ultimately put the United States at a military disadvantage.
“In 20 years of covering tech, I’ve never seen a battle for any type of contract reach this level of nastiness,” said Daniel Ives, an analyst for Wedbush Securities who has closely followed the JEDI saga.
Mr. Ives said he saw the ferocity of the contest mainly as a response to Amazon’s enormous success as the pioneer of cloud computing, which has swiftly become the foundation of much of the digital infrastructure of private industry. He said Amazon’s revenue from federal government contracts, about $200 million in 2014, had reached $2 billion this year, much of it from the C.I.A. and other intelligence agencies.