The Pentagon said on Friday it will award a $10 billion cloud computing contract to Microsoft, following a highly scrutinised bidding process which Amazon had been favoured to win after the intervention of US President Donald Trump.

The 10-year contract for the Joint Enterprise Defence Infrastructure programme (Jedi) ultimately will see all military branches sharing information in one system that can be scoured in real-time with the help of artificial intelligence.

The Pentagon earlier this year put off awarding the hefty contract, saying that the process would be reviewed by the newly appointed defence secretary.

Amazon was considered the leading contender to provide technology for the Jedi programme but critics argued that the bidding process favoured the Seattle-based technology titan.

The move to stall the contract process came a week after Mark Esper was confirmed as the new US secretary of defence.

Esper was selected by US President Donald Trump, who has lashed out at Amazon and company founder Jeff Bezos, who owns the Washington Post.

The Washington Post reported that the contract was the “military’s largest information technology contract award in history” and “is expected to lead to other business across the federal government”.

The contract has caused controversy over whether internet giants who say they want to make the world better should be involved in the defence industry.

Amazon chief Bezos had defended the company’s bid, saying it was important to support US defence efforts, even if it is an unpopular decision to make for the tech giant.

Trump has lashed out against Bezos several times.

“So many stories about me in [the Washington Post] are Fake News,” Trump tweeted in July 2017. In January, he referred to the newspaper as a “lobbyist newspaper”.

Axios reported that Amazon’s value dropped about $31 billion in a single day after Trump promised to “go after Amazon” in a tweet on March 28 last year.

Microsoft was Amazon’s only rival in the bidding for the winner-take-all contract, despite employees urging it to drop out.

“Many Microsoft employees don’t believe that what we build should be used for waging war,” read a post on Medium.

“The contract is massive in scope and shrouded in secrecy, which makes it nearly impossible to know what we as workers would be building.”

Microsoft has defended its interest in military contracts, saying: “All of us who live in this country depend on its strong defence.”

Google had dropped its bid for the contract, saying the deal would be inconsistent with its principles.