MANAMA, Bahrain — The top U.S. military officer voiced support Monday for Defense Secretary Mark T. Esper’s decision to allow a Navy SEAL to remain in the elite service, part of a high-profile case that involved an intervention by President Trump and triggered the resignation of the Navy’s top civilian.

Gen. Mark A. Milley, chairman of the Joint Chiefs of Staff, said the debate over whether Chief Petty Officer Edward Gallagher should keep his SEAL Trident pin was now “case closed.” Gallagher was acquitted in July of charges of murdering an Islamic State prisoner but convicted of posing with the man’s corpse.

“Esper made decisions for good reasons that are within his power,” Milley told reporters traveling with him in the Middle East. “I’ll support the secretary of defense in those decisions.”

Milley declined to comment on Esper’s firing of Navy Secretary Richard V. Spencer, the service’s top civilian. The Pentagon said Esper made the decision over the weekend after he learned that Spencer had proposed a deal to Trump allowing Gallagher to retain his Trident, the symbol of the elite unit, while the Navy was publicly advocating for a military review of the matter, without the Pentagon leader’s knowledge.

Asked about whether Gallagher’s case could have a negative impact on the force, as a number of former officers have alleged, Milley said its handling has not abrogated the military justice process.

“The secretary of defense, the president of the United States are all part of the process, and they made a decision. And as far as I’m concerned, it’s case closed now,” he said. “It’s time to move on and address the national security of the United States.”

Trump’s intervention earlier this month in the Pentagon’s handling of Gallagher and two other service members named in alleged war-crimes incidents sparked criticism from some current and retired military personnel, who said the president should allow the uniformed justice system to proceed uninterrupted.

Critics have said that Trump’s decision to pardon Clint Lorance, a former Army first lieutenant who was serving time for the murder of two unarmed men in Afghanistan, and to clear Mathew Golsteyn, an Army major who admitted killing a Taliban bombmaker, could erode the military’s global standing and create worrisome precedents within the ranks.

In Gallagher’s case, Trump reversed a military decision to demote the SEAL after a military court cleared him of most charges. When news reports later suggested the Navy might take away his Trident, effectively revoking his status as a SEAL, Trump also voiced opposition to that move but did not formally act to block it.

Supporters of the men say they deserve the country’s support after being asked to fight under difficult circumstances.

While Esper had initially made the case to Trump to let the cases conclude within the military system, some defense officials have said Gallagher’s future as a SEAL had become too public and politicized to be handled by a panel of his peers as it typically would.

Despite the controversy, Milley expressed confidence in the order within the military ranks.

“This case obviously raises a variety of questions, but in the main I think the United States military remains and always will remain a highly disciplined force,” he said.

Milley, an Army officer who became chairman this fall, is visiting Middle Eastern nations including Israel, Jordan and Bahrain to voice U.S. support and discuss shared efforts to deter Iran and battle extremist groups such as the Islamic State.