Defense Secretary Mark Esper is removing himself from the review process for the Pentagon's lucrative JEDI cloud-computing contract due to his son's employment at one of the companies that had originally applied to provide the service.

"Although not legally required to, he has removed himself from participating in any decision making following the information meetings, due to his adult son's employment with one of the original contract applicants," the Pentagon said Tuesday.

Amazon and Microsoft had been seen as the finalists for the contract, which could be worth up to $10 billion.

The Pentagon did not name the son in question. Luke Esper, one of the Defense secretary's sons, has worked at IBM since February, according to his LinkedIn page. IBM's proposal had been rejected, and it lost its appeal on the contract in December. In August, Esper, who had taken over as Pentagon chief, began reviewing the JEDI situation after Trump said other companies had complained to him about it.

An IBM spokesperson said in a statement to CNBC, "Secretary Esper's son has been a digital strategy consultant with IBM Services since February. His role is unrelated to IBM's pursuit of JEDI."

Trump has often criticized Amazon and its CEO, Jeff Bezos, who also owns The Washington Post — another frequent target of the president's wrath.

The JEDI contract, which would cover services rendered over as many as 10 years, was originally supposed to be awarded in September 2018. The Pentagon said in August it would not award the contract until Esper, then newly appointed, completed a series of thorough reviews of the technology.

Read the full Pentagon statement:

As you all know, soon after becoming Secretary of Defense in July, Secretary Esper initiated a review of the Department's cloud computing plans and to the JEDI procurement program. As part of this review process he attended informational briefings to ensure he had a full understanding of the JEDI program and the universe of options available to DoD to meet its cloud computing needs. Although not legally required to, he has removed himself from participating in any decision making following the information meetings, due to his adult son's employment with one of the original contract applicants. Out of an abundance of caution to avoid any concerns regarding his impartiality, Secretary Esper has delegated decision making concerning the JEDI Cloud program to Deputy Secretary Norquist. The JEDI procurement will continue to move to selection through the normal acquisition process run by career acquisition professionals.

— CNBC's Jordan Novet contributed to this report.