WASHINGTON (Reuters) - Microsoft Corp. MSFT.O has won the Pentagon's $10 billion cloud computing contract, the Defense Department said on Friday, beating out favorite Amazon.com Inc AMZN.O.

The contracting process had long been mired in conflict of interest allegations, even drawing the attention of President Donald Trump, who has publicly taken swipes at Amazon and its founder Jeff Bezos. Trump in August said his administration was reviewing Amazon’s bid after complaints from other companies.

The Joint Enterprise Defense Infrastructure Cloud (JEDI) contract is part of a broader digital modernization of the Pentagon meant to make it more technologically agile. Specifically, a goal of JEDI is to give the military better access to data and the cloud from battlefields and other remote locations.

Oracle Corp ORCL.N had expressed concerns about the award process for the contract, including the role of a former Amazon employee who worked on the project at the Defense Department but recused himself, then later left the Defense Department and returned to Amazon Web Services.

In a statement, an Amazon Web Services (AWS) spokesman said the company was “surprised about this conclusion.”

The company said that a “detailed assessment purely on the comparative offerings” would “clearly lead to a different conclusion,” according to the statement.

AWS is considering options for protesting the award, a person familiar with the matter told Reuters.

Although the Pentagon boasts the world’s most potent fighting force, its information technology remains woefully inadequate, according to many officials.

Officials have complained of having outdated computer systems and being unable to access files or share information as quickly as they might be able to in the private sector.

FILE PHOTO: Visitors stand in front of a display screen at Microsoft's new Oxford Circus store ahead of its opening in London, Britain July 9, 2019. REUTERS/Simon Dawson/File Photo

“If I am a warfighter, I want as much data as you could possibly give me,” Lieutenant General Jack Shanahan, the director of the Joint Artificial Intelligence Center, told reporters in August describing the importance of the contract.

Some companies were concerned that a single award would give the winner an unfair advantage in follow-on work. The Pentagon has said it planned to award future cloud deals to multiple contractors.

This week, U.S. Defense Secretary Mark Esper removed himself from reviewing the deal due to his adult son's employment with one of the original contract applicants, IBM Corp IBM.N. IBM had previously bid for the contract but had already been eliminated from the competition.

Microsoft said it was working on a comment. IBM and Oracle did not immediately return requests for comment.

In a book slated for publication Oct. 29, retired Navy commander Guy Snodgrass, who served as a speech writer to former Defense Secretary Jim Mattis, said Trump called Mattis and directed him to “screw Amazon” by preventing it from bidding on the JEDI contract, according to an excerpt of the book seen by Reuters ahead of its release.

“We’re not going to do that,” Mattis later told other Pentagon officials, according to the excerpt. “This will be done by the book, both legally and ethically.”

Snodgrass declined to comment pending the release of his book.

In a statement announcing Microsoft as the winner, the Pentagon underscored its view that the competition was conducted fairly and legally.

“All (offers) were treated fairly and evaluated consistently with the solicitation’s stated evaluation criteria. Prior to the award, the department conferred with the DOD Inspector General, which informed the decision to proceed,” it said.

Microsoft shares were up 3% to $144.98 in after-hours trading after the news. Amazon shares were down 0.92% to $1,745.12.

The Pentagon said it had awarded more than $11 billion across 10 separate cloud contracts over the past two years.

“As we continue to execute the DOD Cloud Strategy, additional contracts are planned for both cloud services and complementary migration and integration solutions necessary to achieve effective cloud adoption,” the Pentagon said.