A near-$15 billion Pentagon contract awarded to Microsoft has been halted after Amazon secured a temporary injunction.

Amazon had sought the court order over the Pentagon’s $US10 billion Joint Enterprise Defense Infrastructure (JEDI) cloud contract, which was awarded to Microsoft late last year.

The tech giant has argued that the contract was unfairly awarded to Microsoft, and that US President Donald Trump’s much-publicised feud with Amazon boss Jeff Bezos unduly influenced the tender process, The Verge reported.

The judge’s order means the cloud contract cannot move forward until Amazon’s lawsuit is resolved either way.

Microsoft had been set to begin work on the contract, which is to overhaul the agency’s cloud services, as early as last week.

Amazon has argued that the process of awarding the massive contract had “clear deficiencies, errors and unmistakable bias”.

It said that Trump’s animosity with Bezos, who also owns The Washington Post, unfairly influenced the decision-making process.

Trump has previously threatened to ruin Amazon’s partnership with the US Postal Service, and a new book has claimed that the President told former Defense Secretary James Mattis to “screw Amazon” on the JEDI contract.

Trump himself has said that the US government was getting “tremendous complaints from other companies” about the contract process.

The court order was slammed by Pentagon spokesperson Lt. Col. Robert Carver, who said that delays in beginning the cloud project would lead to “financial harm of between $US5 and $US7 million dollars every month that performance of the JEDI contract is delayed”.

“We are disappointed in today’s ruling and believe the actions taken in this litigation have unnecessarily delayed implementing DoD’s modernisation strategy and deprived our warfighters of a set of capabilities they urgently need,” Carver said in a statement.

“However, we are confident in our award of the JEDI cloud contract to Microsoft and remain focused on getting this critical capability into the hands of our warfighters as quickly and efficiently as possible.”

Amazon may be liable to pay for these costs if it eventually loses the case, with the tech giant “directed to provide security in the amount of $US42 million for the payment of such costs and damages as may be incurred or suffered in the event that future proceedings prove that this injunction was issued wrongfully”.

The judge’s decision is currently sealed so the full reasons behind the decisions are still unknown.

A redacted version of the decision is set to be released in two weeks.

Amazon is pushing for Trump, Mattis and current Defense Secretary Mark Esper to testify in the case.

Amazon had argued that the actions the Department was taking in the early steps of the project would “entrench” Microsoft as the only provider.

“Without an injunction, continued performance of the JEDI contract could jeopardise the relief available to AWS if it prevails in the protest,” the company said.

“In contract, because Microsoft has no rightful claim to the JEDI contract, it would not suffer any cognisable harm at all.”

In another Amazon filing, the company also hit back at suggestions from the Department that work on the project needed to begin immediately.

“DoD did not display the urgency it now chums after it closed that investigation,” it said. “Rather than awarding the contract to allow performance by July 2019, DoD initiated a ‘review’ of the JEDI procurement by Defense Secretary Mark Esper.

“Before Secretary Esper even commenced his review, he publicly confirmed there was no ‘hard timeline’ for its completion, and certainly did not include imminent urgency for national security.”