WASHINGTON — President Trump said on Thursday that he was looking “very seriously” at intervening in the hard-fought commercial battle for a $10 billion Pentagon cloud computing contract for which Amazon, a company he has frequently attacked, is seen as the leading contender.

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

For the president to weigh in on the award of a major government contract would be highly unusual, raising questions of improper political influence, but the stakes are high and Amazon’s competitors have been lobbying aggressively. Mr. Trump has long carried on a one-sided feud with Jeff Bezos, Amazon’s founder, over some of the company’s business activities and also over what the president refers to as “The Amazon Washington Post,” though Mr. Bezos owns the newspaper personally, not as a corporate asset.

Asked by reporters about the contract known as JEDI, for Joint Enterprise Defense Infrastructure, Mr. Trump said he was “getting tremendous complaints about the contract with the Pentagon and with Amazon.”

“They’re saying it wasn’t competitively bid,” he said.

In fact, the contract has not yet been awarded and has been the subject of a monthslong competition involving Amazon, Microsoft, Oracle and IBM. Pentagon officials decided in April that only Amazon and Microsoft had the capacity to meet the military’s requirements, and they have said they expect to choose the winner in late August.