Navy Secretary Richard Spencer was traveling in California on March 30 when he received a 4 a.m. phone call from President Trump. The president demanded that the Navy release from the brig a SEAL named Edward Gallagher, who was awaiting trial for allegedly murdering an Islamic State detainee in Iraq in 2017.

“Get him out!” Trump told Spencer, who was visiting a naval intelligence school in Monterey. A widely respected former Marine aviator and Wall Street banker, Spencer had served as the Navy’s top civilian since August 2017.

Spencer was surprised by this sudden presidential intervention. The Navy had been trying to impose better discipline among the SEALs, and all other Navy units, following what was known as the “Fat Leonard” bribery scandal and other mishaps. Spencer and his top admirals were sending a tough corrective message that the Navy would steer “true north” on ethical issues, even if that meant harsh penalties for misdeeds.

But Trump was insistent: “Do you want me to give you a direct order? Get him out!” the president instructed his Navy secretary. Spencer complied with this directive from the commander in chief, and Gallagher was soon moved to more comfortable confinement.

Trump tweeted about an hour after his call with Spencer: “In honor of his past service to our Country, Navy Seal #EddieGallagher will soon be moved to less restrictive confinement while he awaits his day in court.”

The Gallagher case has received relatively little publicity. But it’s a disturbing tale of Trump’s meddling in an important effort to maintain military discipline and accountability. This account is based on conversations with administration and congressional sources who are familiar with the matter.

The March diktat was Trump’s first involvement in the Gallagher case, but it wouldn’t be his last. Trump next proposed a pretrial pardon, but Spencer dissuaded him. Then, in July, after Gallagher was acquitted of murder but convicted of the minor offense of having his picture taken with the corpse, Trump tweeted congratulations and wrote, “Glad I could help!”

Gallagher was demoted. But this month Trump directed Spencer to restore his former rank of E-7. Spencer requested a formal order, and when it was sent, the Navy secretary again complied. At the same time, on Nov. 15, Trump also pardoned a Green Beret officer who faced a murder trial and an Army officer convicted for ordering his men to shoot unarmed Afghan civilians.

Trump’s collision with the Navy reached a shuddering climax Thursday, when the president attempted to scuttle another Navy review. Rear Adm. Collin Green, the top SEAL commander, had convened a panel of Gallagher’s peers to decide whether to withdraw his “Trident” pin marking him as a SEAL. The Navy has taken such action in more than 150 cases since 2011.

But Trump tried to sink this peer review with another tweet: “The Navy will NOT be taking away Warfighter and Navy Seal Eddie Gallagher’s Trident Pin. This case was handled very badly from the beginning. Get back to business!”

Why has Trump been so emphatic about protecting this SEAL, who was known among colleagues as a “pirate” whose warrior tactics sometimes violated rules?

Perhaps it’s because Gallagher’s legal team includes two Trump friends who are also former partners of his personal lawyer Rudolph W. Giuliani: investigator Bernard Kerik, who is a former New York police commissioner and also a convicted felon; and Marc Mukasey, who represents Trump in a New York bank-records case. Another Gallagher advocate has been Fox News commentator Pete Hegseth, who reportedly has been represented by Tim Parlatore, Gallagher’s lead lawyer.

Whatever motivated Trump’s intervention, it has angered many senior military officers and Pentagon civilians. The rebuke of Green has been especially disturbing, because it subverts his efforts to instill better ethics and discipline in a SEAL community that commanders fear has become unmoored by its recent Hollywood celebrity and tolerated unethical behavior.

“Our Force has drifted from our Navy core values of Honor, Courage and Commitment . . . due to a lack of action at all levels of Leadership,” Green wrote his commanders in August. “This drift ends now.”

To enforce accountability in the Gallagher case, Green had also ordered review of the Trident status of three SEAL officers who had supervised Gallagher.

What happens next? Spencer has asked the White House for a written order canceling the Trident review panels for the four SEALs. But if the order comes, the Navy secretary will face a painful choice of whether to resign or carry it out.

Pentagon leaders are fuming about Trump’s intervention to overrule military justice. A nation that loves its military should be outraged, too. Just as Trump subverted his diplomats in Ukraine, he’s now sabotaging his admirals and generals. This must stop.

Read more: