A federal judge in Washington ordered Microsoft on Thursday to halt all work on a $10 billion cloud-computing contract for the Pentagon, in a victory for Amazon, which had challenged the awarding of the contract.

In a sealed opinion, the judge, Patricia E. Campbell-Smith of the Court of Federal Claims, ordered work to stop on the Joint Enterprise Defense Infrastructure project, known as JEDI, until Amazon’s legal challenge was resolved. The 10-year contract was one of the largest tech contracts from the Pentagon, and Microsoft was set to begin work on it this month.

The decision adds to the acrimony surrounding the lucrative deal, which was a major prize in the technology industry, and ratchets up the legal battle around the transformation of the military’s cloud-computing systems. Amazon had been seen as a front-runner to win the JEDI contract, but the Department of Defense awarded it to Microsoft in October.

Amazon protested and said the process had been unfair. The internet giant claimed that President Trump had interfered in the bidding for the contract because of his feud with Jeff Bezos, Amazon’s chief executive and owner of The Washington Post. The Post has aggressively covered the Trump administration, and the president has referred to the newspaper as the “Amazon Washington Post” and accused it of spreading “fake news.”