WASHINGTON (Reuters) - A U.S. judge on Thursday granted Amazon.com Inc’s request to temporarily halt the U.S. Department of Defense and Microsoft Corp from moving forward on an up-to-$10 billion cloud computing deal that Amazon says reflected undue influence by President Donald Trump.

Amazon, which had been seen as a front-runner to win the contract, filed a lawsuit in November just weeks after the contract was awarded to Microsoft. Trump has publicly derided Amazon head Jeff Bezos and repeatedly criticized the company.

Judge Patricia Campbell-Smith issued a preliminary injunction but did not release her written opinion. She also ordered Amazon to post $42 million in the event the injunction was issued wrongfully.

The Amazon lawsuit said the Defense Department’s decision was full of “egregious errors,” which were a result of “improper pressure from President Donald Trump, who launched repeated public and behind-the-scenes attacks” to steer the contract away from Amazon “to harm his perceived political enemy” Bezos.

Bezos also owns the Washington Post, whose coverage has been critical of Trump and which has frequently been a target of barbs by Trump about the news media.

The Pentagon, which had planned to start work on the contract on Friday, said it was disappointed in the ruling.

Lieutenant Colonel Robert Carver, a Defense Department spokesman, said the Pentagon believed “the actions taken in this litigation have unnecessarily delayed implementing DoD’s modernization strategy and deprived our warfighters of a set of capabilities they urgently need.”

FILE PHOTO: The Microsoft sign is shown on top of the Microsoft Theatre in Los Angeles, California, U.S. October 19,2018. REUTERS/Mike Blake/File Photo

It added it remained “confident in our award of the JEDI Cloud contract to Microsoft.”

Defense Secretary Mark Esper previously denied there was bias and said the Pentagon made its choice fairly and freely without external influence.

Alexander Major, a partner at McCarter & English, said: “The court has confirmed through the injunction that Amazon’s challenges with respect to this procurement are not trivial. It’s not guaranteed that they will prevail but the fact that they got it at all is a big deal.”

Amazon shares closed down 0.4%, while Microsoft was down 0.5%.

TESTIMONY SOUGHT FROM TRUMP

As part of the lawsuit, Amazon asked the court in January to pause the execution of the contract, popularly known as the Joint Enterprise Defense Infrastructure Cloud, or JEDI. The contract is intended to give the military better access to data and technology from remote locations.

Microsoft said in a statement: “We have confidence in the Department of Defense, and we believe the facts will show they ran a detailed, thorough and fair process.”

Amazon did not immediately respond to requests for comment. The White House declined comment.

Earlier this week, Amazon’s cloud computing unit, Amazon Web Services, said it was seeking to depose Trump and Esper in its lawsuit over whether the president was trying “to screw Amazon” over the contract.

Amazon also seeks to question other officials involved in the decision and alleged that Trump had a history of inappropriately intervening in governmental decisions. Amazon called the process “fatally flawed and highly unusual.”

The procurement process has been delayed by legal complaints and conflict-of-interest allegations.

The judge told Amazon and the Pentagon to confer by Feb. 27 on what portions of the opinion can be released publicly.