Esper's comments Monday were the latest twist in the case of Chief Petty Officer Edward Gallagher, which led to a conflict between Trump and armed services leaders over military discipline. The dispute peaked over the weekend with the firing of Navy Secretary Richard V. Spencer.
Gallagher was acquitted of murder in the stabbing death of an Islamic State militant captive but convicted by a military jury of posing with the corpse while in Iraq in 2017.
Esper initially favored allowing the Navy to proceed with a peer-review board which could have resulted in Gallagher losing his SEAL status, but he said he was obliged to follow Trump's order. Still, Esper also directed the Pentagon's legal office to review how service members are educated in the laws of armed conflict and trained to wartime behavioral standards.
"I can control what I can control," Esper told reporters when asked whether Trump sent the right message to U.S. troops by intervening to stop the Gallagher review. "The president is the commander in chief. He has every right, authority and privilege to do what he wants to do."
In yet another twist to the Gallagher saga, Esper also made an extraordinary accusation against Spencer.
Esper said Spencer had gone behind his back last week to propose a secret deal with the White House in which Spencer would fix the outcome of the Gallagher review. Esper said this was a violation of the military chain of command and said Spencer acknowledged his misstep.
Through a Navy spokesman, Spencer declined requests for comment on Esper's allegation. However, in a letter to Trump on Sunday he said he could not in good conscience follow an order that he believed would undermine the principle of good order and discipline in the military — suggesting he had been ordered to stop the peer-review process for Gallagher.
Trump began to get involved in the Gallagher case in the spring after Bernard Kerik, a former business partner to his personal lawyer Rudy Giuliani, became an advocate for the family and made appearances in conservative media.
The SEAL also changed his defense team to include Marc Mukasey, a lawyer for the Trump real estate company.
The president has tweeted in support of Gallagher, praising the sailor's service and saying the case was "handled very badly from the beginning."
Earlier this month, Trump restored Gallagher's rank, which had been reduced in his military jury conviction.
Trump also pardoned two soldiers — a former Army special forces soldier set to stand trial next year in the killing of a suspected Afghan bombmaker in 2010 and an Army officer who had been convicted of murder for ordering his soldiers to fire on three unarmed Afghan men in 2012, killing two.
Beyond the Spencer firing, the Gallagher case has raised questions about the appropriate role of a U.S. president in matters of military justice. Esper said Trump had a constitutional right to intervene, but others worry that such actions undermine the credibility of American claims to be a leader in ethical and lawful behavior on the battlefield.
"What concerns me the most is the chilling effect this will have on special forces' willingness to report when they see illegal behavior," James Stavridis, a retired Navy admiral, said in an email to The Associated Press. "That is tragic because in the end what separates us from our opponents on the battlefield is our willingness to follow the rule of law."
Sen. Jack Reed, the ranking Democrat on the Senate Armed Services Committee and an Army veteran, accused Trump of "inappropriate involvement" in the military justice system.
"The White House's handling of this matter erodes the basic command structure of the military and the basic function of the Uniform Code of Military Justice," Reed said.
Carl Tobias, a law professor at the University of Richmond School of Law, said Trump's action undercut the military.
"We want to be a standard for the world in terms of rule of law," he said. "I'm concerned that it undermines our own military; it undermines our standing in the world."
Trump has said Gallagher was treated unfairly by the Navy.
"I think what I'm doing is sticking up for our armed forces," he said Monday. "There's never been a president who is going to stick up for them and has like I have."
Last week Trump tweeted that Gallagher must be allowed to retire as a SEAL, regardless of the Navy's intention to review his standing in the elite force. Esper's comments Monday revealed that on Sunday Trump had given the defense secretary a direct order to make this happen.
Even before receiving that order, however, Esper had decided the Gallagher process should be stopped. He said his rationale was that, "given the events of the last few days," it was no longer possible for Gallagher to get a fair shake.
"As professional as they are," he said of the Navy review board members, "no matter what they would decide, they would be criticized from many sides, which would further drag this issue on, dividing the institution. I want the SEALs and the Navy to move beyond this now, fully focused on their warfighting mission."
In announcing Sunday that he had dismissed Spencer, Esper said he acted after learning of Spencer's secret plan to "guarantee" in advance the outcome of the review board that was to convene next week.
Spencer had "proposed a deal whereby if the president allowed the Navy to handle the case, he would guarantee that Eddie Gallagher would be restored to rank, allowed to retain his Trident and permitted to retire," Esper said Monday.
This was "completely contrary" to what Esper and the rest of the Pentagon leadership had agreed to, he said, and contrary to Spencer's public position that the Navy disciplinary process should be allowed to play out with no interference.
Esper said he had previously advocated for allowing the Navy review to go forward. But when Trump gave him a "verbal instruction" to stop the process, he did so.
Esper did not say explicitly that he disagreed with Trump's order.
Once Trump gave the order, Esper said he responded, "Roger. I got it."