PHOTO: David Ryder/Getty Images
Now playing
00:57
How Amazon's Jeff Bezos spends his immense wealth
Now playing
02:13
ECB president on women leaders: 'Of course we can do the job'
Now playing
01:36
Michael Bolton wants you to break up with Robinhood
Now playing
01:57
Fed chief downplays inflation concerns
Now playing
04:34
See what has happened to Trump's DC hotel after his loss
Now playing
01:41
Meet the 29-year-old cancer survivor set to make history in space
WASHINGTON, DC - JANUARY 15: MyPillow CEO Mike Lindell waits outside the West Wing of the White House before entering on January 15, 2021 in Washington, DC. (Photo by Drew Angerer/Getty Images)
PHOTO: Drew Angerer/Getty Images
WASHINGTON, DC - JANUARY 15: MyPillow CEO Mike Lindell waits outside the West Wing of the White House before entering on January 15, 2021 in Washington, DC. (Photo by Drew Angerer/Getty Images)
Now playing
00:39
MyPillow and its CEO Mike Lindell sued by Dominion
Bill Gates AC intv 022021
PHOTO: CNN
Bill Gates AC intv 022021
Now playing
02:32
Will Bill Gates go back to shaking hands? Hear his thoughts
02 Bill Gates AC intv 02202021
PHOTO: CNN
02 Bill Gates AC intv 02202021
Now playing
02:13
Bill Gates optimistic about climate policy under Biden WH
Now playing
05:37
Texas mayor: We were not prepared
Now playing
03:05
Watch lawmakers grill Robinhood's CEO
PHOTO: CNN
Now playing
04:47
ERCOT CEO explains how Texas power failure happened
NEW YORK, NEW YORK - OCTOBER 15: A person walks by a closed New York City business on October 15, 2020 in New York City. As American workers continue to struggle in an economy brought down by COVID-19, new jobless claims rose to 898,000 last week. It was the highest number since August 22 and represented a gain of 53,000 from the previous week
PHOTO: Spencer Platt/Getty Images
NEW YORK, NEW YORK - OCTOBER 15: A person walks by a closed New York City business on October 15, 2020 in New York City. As American workers continue to struggle in an economy brought down by COVID-19, new jobless claims rose to 898,000 last week. It was the highest number since August 22 and represented a gain of 53,000 from the previous week's upwardly revised total of 845,000. (Photo by Spencer Platt/Getty Images)
Now playing
01:11
Weekly initial jobless claims jump to 861,000
Now playing
02:42
A challenging year for women: Millions are out of work
MELBOURNE, AUSTRALIA - FEBRUARY 18: In this photo illustration a message is seen on Facebook mobile, on February 18, 2021 in Melbourne, Australia. Facebook has banned publishers and users in Australia from posting and sharing news content as the Australian government prepares to pass laws that will require social media companies to pay news publishers for sharing or using content on their platforms. (Photo by Robert Cianflone/Getty Images)
PHOTO: Robert Cianflone/Getty Images AsiaPac/Getty Images
MELBOURNE, AUSTRALIA - FEBRUARY 18: In this photo illustration a message is seen on Facebook mobile, on February 18, 2021 in Melbourne, Australia. Facebook has banned publishers and users in Australia from posting and sharing news content as the Australian government prepares to pass laws that will require social media companies to pay news publishers for sharing or using content on their platforms. (Photo by Robert Cianflone/Getty Images)
Now playing
03:05
Facebook blocks news sharing in Australia in response to government proposal
PHOTO: Anadolu Agency via Getty Images
Now playing
00:58
Watch Trump's Atlantic City casino implode
(CNN Business) —  

Amazon is considering its options for how to move forward following the decision to award a massive government contract to its competitor, Microsoft, according to a source familiar with the situation. One analyst said he “fully expects” Amazon to try to fight the decision in court.

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 for Microsoft.

The contentious decision represents a major loss for Amazon (AMZN) and a boon to Microsoft (MSFT), especially as both companies have seen the growth of their cloud businesses slow in recent months. It also threatens to undermine Amazon (AMZN)’s position as the clear leader in the cloud industry and CEO Jeff Bezos’ title as richest man in the world.

Friday’s decision came after months of controversy and protest over the process for awarding the deal and President Donald Trump’s public criticism of Amazon, long considered the frontrunner.

“This is a game changer deal for Microsoft to win as this will have a ripple effect for years to come and speaks to a new chapter of [Microsoft] wining in the cloud versus Amazon,” Wedbush analyst Dan Ives said in a note to investors Saturday, adding that he thinks Amazon and others may challenge the decision in court.

The timing is especially painful for Amazon, which said it was surprised by the decision, calling itself the “clear leader in cloud computing.” The company’s stock was already down at the end of the week after it announced on Thursday a 28% drop in profits in the most recent quarter. At the same time Amazon is funneling money into speeding up its shipping capabilities, growth at its cloud services division, Amazon Web Services, is slowing. Amazon’s stock fell nearly another 1% in after-hours trading over the weekend.

Amazon Web Services has long been a key income driver for the company, generating a relatively small percentage of Amazon’s sales but a majority of its profits. And an additional $1 billion a year would have been a significant boost — AWS generated $25.7 billion in annual revenue last year.

Those big sales are thanks in no small part to AWS’s government and other public sector clients, including 5,000 government agencies and 10,000 academic institutions. It became the leader in government cloud contracts by seeking out federal business early on and becoming the first to achieve various security and procurement qualifications. In 2013, it received a breakthrough $600 million contract to provide cloud services to the CIA.

But maintaining its dominance required hanging onto those government deals, something Amazon failed to do with JEDI.

The loss of JEDI will likely hit Jeff Bezos directly and could cause him to again fall behind Microsoft founder Bill Gates as richest man in the world. Bezos owns roughly 57 million shares of Amazon — around 12% of the company. Compared to the beginning of last week, Bezos’ net worth has fallen more than $1 billion because of the effect of the tough earnings report and JEDI contract decision on Amazon’s stock.

Amazon likely wasn’t helped by Trump’s dislike of Bezos and the Washington Post, which he owns.

A new 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, according to the book. In June, Trump said his administration would carefully review the Pentagon’s contract plan after he said Amazon competitors, including Microsoft, complained about the process.

“The acquisition process was conducted in accordance with applicable laws and regulations,” the Department of Defense said in its announcement of the contract Friday. “All offerors were treated fairly and evaluated consistently with the solicitation’s stated evaluation criteria.”

The Department did not immediately return a request for comment Sunday.

Wedbush’s Ives said he projects the deal will ultimately add $10 per share to Microsoft’s stock.

“We brought our best efforts to the rigorous JEDI evaluation process and appreciate that DoD has chosen Microsoft,” Toni Townes-Whitley, Microsoft’s president of US regulated industries, said in a statement to CNN.

There are likely more big government deals to come. The Department of Defense on Friday said “additional contracting opportunities are anticipated.”

Gartner analyst Craig Lowery has estimated that just around 10% of the federal government has transitioned to the cloud. Ives said the market opportunity in providing cloud services to the DoD and other government agencies could reach $100 billion in the coming years. And now, Microsoft may have a leg up against Amazon in securing more of that business.

“We believe Microsoft and [CEO Satya] Nadella are popping the champagne tonight … while Bezos and Amazon are likely shocked they lost the World Series of cloud deals with JEDI,” Ives said.

Shannon Liao contributed to this report