The Department of Defense announced Friday it is awarding the coveted $10 billion, 10-year contract to build the military’s war cloud to Microsoft.

It’s a huge win for Microsoft over Amazon, which had long been seen as a frontrunner for the Joint Enterprise Defense Infrastructure (JEDI) cloud contract that will migrate the Pentagon’s computing infrastructure and data to the cloud.

“We’re surprised about this conclusion,” an Amazon Web Services spokesperson said in a statement sent to GeekWire. “AWS is the clear leader in cloud computing, and a detailed assessment purely on the comparative offerings clearly lead to a different conclusion. 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.”

Microsoft appeared caught off-guard by the news. Asked for comment, a spokesperson said, “We are working on this right now. In the meantime for more information see the DOD’s announcement.”

Amazon and Microsoft were the finalists for the contract, beating out competitors including IBM and Oracle, a vocal critic of the process.

Google dropped out of the running for the contract this past October, saying that “we couldn’t be assured that it would align with our AI Principles” and noting portions of the contract “were out of scope with our current government certifications.”

“Had the JEDI contract been open to multiple vendors, we would have submitted a compelling solution for portions of it,” the company wrote.

Google was not alone in criticizing the single-vendor approach. Oracle sued the Department of Defense, claiming the procurement process was tailor-made for Amazon. A federal judge shot down the protest.

The Pentagon was expected to announce a winner this summer, but the timeline was delayed after President Trump raised concerns about the fairness of the process, with Amazon considered the front-runner.

In July, Trump told reporters that he was “getting tremendous complaints about the contract with the Pentagon and with Amazon … they’re saying it wasn’t competitively bid.” A few weeks later, his defense secretary, Mark Esper, launched a review of the procurement process, delaying the conclusion of the contest. Esper later recused himself from the review because of his son’s work for IBM.

A ProPublica investigation in August revealed how close Amazon and its CEO Jeff Bezos have been to the project since its inception. Microsoft’s surprise win of JEDI will likely be seen as politically motivated in some circles.

A new book written by a former aide to Defense Secretary James Mattis alleges that Trump called Mattis in the summer of 2018 and directed him to “screw Amazon” out of the contract.

Amazon and Microsoft, both based in the Seattle area, are the leading U.S. cloud providers and fierce rivals in a growing industry as more companies migrate their businesses to the cloud. Microsoft has an entire web page touting why it believes Azure is better than AWS.

Azure is a fast-growing business for Microsoft that continues to help power the company’s bottom line. Its “commercial cloud” generated $11.6 billion in revenue in the most recent quarter, up 36 percent year over year.

Microsoft has signed a flurry of cloud deals in recent months with companies such as AT&T and SAP, which follows similar deals with Sony, Kroger, and others over the past year. It has also swooped up four cloud startups since July, and said LinkedIn would move to Azure.

Though Microsoft is still catching up to industry-leader Amazon, the JEDI contract validates the company’s progress and could help it win more business going forward.

“The world’s leading companies are choosing our cloud to build their digital capability,” Microsoft CEO Satya Nadella said in a statement after its earnings report this week.

Charles Fitzgerald, a Seattle-based angel investor and cloud industry watcher who was previously a general manager at Microsoft, said the award “should underscore that cloud is pretty much a two horse race between AWS and Azure at this point.”

“Microsoft is consistently winning bigger and more complex cloud deals, and this certainly is one of those,” he said.

Corey Quinn, a cloud economist at the Duckbill Group, tweeted that “for AWS this would have been another large customer. For Azure, it changes their future.”

This is good news on a few levels. 1. I don’t think anyone wants an Amazonian monoculture.

2. It solidifies Azure as a viable option for Serious Business.

3. It ideally wakes AWS up a bit as to how they’re perceived. — Corey Quinn (@QuinnyPig) October 25, 2019

JEDI is a massive overhaul of the DOD’s technology infrastructure that will allow different branches of the military to share sensitive information in the cloud and incorporate artificial intelligence technology.

“The National Defense Strategy dictates that we must improve the speed and effectiveness with which we develop and deploy modernized technical capabilities to our women and men in uniform,” DOD Chief Information Officer Dana Deasy said in a press release. “The DOD Digital Modernization Strategy was created to support this imperative. This award is an important step in execution of the Digital Modernization Strategy.”

Microsoft has a number of contracts with the federal government, to the consternation of some of its employees. Increasingly, Microsoft workers are organizing to put pressure on the company to cancel contracts with government agencies, such as Immigration and Customs Enforcement. The employee activism stems from anger over some of the Trump administration’s policies.

Microsoft President Brad Smith addressed those concerns during an interview with GeekWire last month.

“Our view is, we actually don’t think it makes sense to just cancel contracts in democratically elected societies and start unplugging people from technology,” Smith said. “In part, we do feel that way as a matter of principle. The government was elected, the companies were not. Imagine if you’re the electric company and you say, ‘hey we don’t like what this government agency enacted so we’re going to unplug them.'”

Speaking last year at a Wired conference, Bezos was asked about his philosophy in regard to big tech companies working with government.

“We are going to continue to support the DoD, and I think we should,” Bezos said. “One of the jobs of a senior leadership team is to make the right decision, even when it’s unpopular. If big tech companies are going to turn their back on the U.S. Department of Defense, this country is going to be in trouble.”