SEATTLE — A federal judge ruled on Friday that Amazon did not unduly influence the shape of one of the largest technology contracts in the Pentagon’s history, setting the stage for the Department of Defense to choose between Amazon and Microsoft for the $10 billion project.

[Update: Microsoft wins Pentagon’s $10 billion JEDI contract, thwarting Amazon.]

Oracle had alleged that Amazon and the Defense Department biased the contract, known as the joint enterprise defense infrastructure, or JEDI, in Amazon’s favor because of conflicts of interest with past employees. The Pentagon’s internal reviews previously dismissed the claims, as did the Government Accountability Office. On Friday, Judge Eric Bruggink of the United States Court of Federal Claims found that those previous findings “were not arbitrary, capricious, an abuse of discretion or otherwise not in accordance with law.”

There are no obvious remaining paths for Oracle to challenge the Department of Defense’s approach before the contract is awarded, which will probably happen in late August.

Doug Stone, an Amazon spokesman, said in a statement that the company “stands ready to support and serve what’s most important — the D.O.D.’s mission of protecting the security of our country.”