New York CNN Business  — 

The Department of Defense’s decision last month to award a massive cloud computing contract to Microsoft was a huge loss for rival Amazon. Amazon isn’t going down without a fight.

On Thursday, an Amazon (AMZN) spokesperson told CNN Business it plans to file a formal legal complaint protesting the decision. The company claims the deal was marred by “errors and unmistakeable bias.”

Amazon Web Services “is uniquely experienced and qualified to provide the critical technology the US military needs, and remains committed to supporting the (Department of Defense’s) modernization efforts,” an AWS spokesperson said in a statement to CNN Business.

The contract — called Joint Enterprise Defense Infrastructure, or JEDI — involves providing cloud storage of sensitive military data and technology, such as artificial intelligence, to the Department of Defense, and could result in a payoff of up to $10 billion over 10 years. The Pentagon chose Microsoft (MSFT)’s Azure cloud for the job, saying in a statement announcing the decision that Microsoft (MSFT) would help improve the “speed and effectiveness with which we develop and deploy modernized technical capabilities to our men and women in uniform.”

Microsoft did not immediately respond to a request for comment for this story.

US Secretary of Defense Mark Esper, who recused himself from the final decision-making process, was asked about the JEDI contract and Amazon’s challenge at a press conference in South Korea on Friday.

“I am confident that it was conducted freely and fairly without any type of outside influence,” he said.

For Amazon, losing the deal could threaten its position as leader of the cloud industry, as well as its ability to land other potentially lucrative government deals in the future. AWS has long been the company’s leading profit driver.

The JEDI decision process was long and contentious.

AWS had been considered the clear favorite to win the contract. The company had already been providing some cloud services to the Department of Defense, and in 2013 won a breakthrough $600 million CIA cloud contract. But that changed after President Donald Trump began raising questions about the evaluation process. Trump has long been critical of Amazon and its CEO Jeff Bezos, who owns the Washington Post.

A book written by the speech writer for former Defense Secretary Jim Mattis says that Trump called Mattis in the summer of 2018 and directed him to “screw Amazon” out of a chance to bid on the contract, according to the website Task and Purpose. Mattis declined to do that, per the book.

This past June, Trump said his administration would carefully review the Pentagon’s contract plan after he said Amazon competitors, including Microsoft, complained about the process. Then, in July, a document from tech giant Oracle alleging a large conspiracy to decide in favor of Amazon made its way to Trump’s desk. Oracle was an early contender for the deal, but did not make it to the final stage.

In announcing the decision last month, the Department of Defense said the acquisition process “was conducted in accordance with applicable laws and regulations.” Microsoft, whose cloud business has been growing faster than Amazon’s in recent quarters, said the decision reflected the fact that it brought its “best efforts to the rigorous JEDI evaluation process.”

But now, Amazon is calling for that process to be reviewed.

“We also believe it’s critical for our country that the government and its elected leaders administer procurements objectively and in a manner that is free from political influence. Numerous aspects of the JEDI evaluation process contained clear deficiencies, errors, and unmistakable bias — and it’s important that these matters be examined and rectified,” the AWS spokesperson said.

CNN’s Zachary Cohen and Michelle Toh contributed to this report.