Secretary of Defense Mark Esper told reporters on Monday that President Donald Trump had personally ordered him to ensure that Eddie Gallagher, who was accused of murdering an ISIS fighter and shooting at civilians, to remain in the Navy SEALs.

“I recall for certain on Sunday when I talked to the President to update him on the situation where he said, ‘what about the pin, I want Eddie’s’ — he wanted Eddie Gallagher’s pin restored and I said, ‘Roger, I got it,'” Esper said, according to CNN.

The Pentagon leader was referring to the Trident Pin, which symbolizes a military member’s status as a SEAL.

Though Gallagher was acquitted of most of the charges against him, he was still convicted for of posing with the corpse of the ISIS fighter he had been accused of killing.

The Navy’s Trident Review Board was in the process of deciding whether to rescind Gallagher’s pin when Trump suddenly injected himself into the affair last week.

“The Navy will NOT be taking away Warfighter and Navy Seal Eddie Gallagher’s Trident Pin,” he tweeted. “This case was handled very badly from the beginning.”

Trump’s declaration threw the Pentagon into chaos and caused a rift between Esper and Navy Secretary Richard Spencer, who was ousted on Sunday. Esper said that Spencer had gone behind his back to convince the White House to keep Trump from interfering in Gallagher’s case.

Prior to his declaration, Trump had reversed the demotion Gallagher had received as punishment for the conviction.