This is life in the United States military under President Trump: Eddie Gallagher still has a job. Richard Spencer does not.

Gallagher is the Navy SEAL convicted earlier this year of posing in a photo with a dead captive during his 2017 service in Iraq — a violation of the laws of war. Spencer is the Navy secretary who wanted Gallagher stripped of his Trident pin as punishment for the crime.

On Sunday, Spencer was fired by Defense Secretary Mark Esper.

There are several sides to this story: Spencer said he was going to resign out of principle, while Esper said he had lost confidence in Spencer's truthfulness in handling the matter. But it seems clear Spencer might still have a job if not for Trump's decision to intervene early and often in the Gallagher case, disrupting both the chain of command and the Navy's increasingly desperate efforts to keep discipline in the ranks.

By interceding on behalf of Gallagher and other convicted war criminals, Trump seems determined to remake the U.S. military in his own image: cruel, undisciplined, careless of legal lines, and lacking any evident sense of public virtue.

This will not be good for America's armed forces, at home or abroad.

"The rule of law is what sets us apart from our adversaries," Spencer wrote in his departure letter Sunday, adding: "Unfortunately it has become apparent that in this respect, I no longer share the same understanding with the commander-in-chief who appointed me, in regards to the key principle of good order and discipline."

Some context is helpful: Gallagher was charged after fellow SEALs accused him of shooting civilians and killing a captive Islamic State fighter. He was also charged with threatening to kill fellow SEALs who reported him. Ultimately, a military jury found him guilty only for the photo, and Gallagher was reduced in rank.

Even that was a serious offense, said one of the jurors in Gallagher's case.

Gallagher "should have set an example for good order and discipline," the juror, who also serves in the military, told The New York Times. "He should have ensured stuff like that wasn't happening. And he didn't. He doesn't deserve to wear chief's anchors."

From the beginning, however, Trump put his thumb on the scale in favor of Gallagher. He ordered the release of Gallagher from the brig while the commando awaited trial on murder charges, then blocked the Navy's effort to reduce Gallagher's rank and expel him from the SEALs after the commando was found guilty of a lesser charge.

No doubt, Gallagher's case was a difficult one: Prosecutors were accused of spying on defense lawyers, the lead prosecutor was replaced as a result, and a key witness unexpectedly changed his story at trial. But Trump has a pattern of intervening in similar, less-complicated matters, and his latest interference short-circuited the SEALs' review process.

"The Navy will NOT be taking away Warfighter and Navy Seal Eddie Gallagher's Trident Pin," Trump tweeted on Thursday. "This case was handled very badly from the beginning. Get back to business!"

The Navy knows a think or two about discipline — there is more saluting and standing at attention on an aircraft carrier than in the general population — but business hasn't been so great lately. After a series of scandals that included allegations of sexual assault and drug use, Rear Adm. Collin Green, the SEALs commander, in August sent a memo to senior leaders ordering them to get the service back into shape.

"Our Force has drifted from our Navy core values of Honor, Courage, and Commitment and the tenets of our Naval Special Warfare Ethos due to a lack of action at all levels of Leadership," Green wrote. "This drift ends now."

That may be difficult to achieve under Trump. The president has made it clear he has little use for the laws of war, nor much understanding of why military leaders would embrace those rules and see them as a form of protection for American troops. He has tried to unshackle the military from rules of engagement that constrain its actions on the battlefield — loosening standards on civilian deaths in some regions — and suggested the U.S. steal resources like oil from countries where the military operates.

The president's actions signal to American warfighters they can disregard the constraints that are left — no matter what their commanders tell them. And if, like Gallagher, they break the rules, they can just make their case to the president and the public by getting Fox News to advocate for them, and the consequences may disappear entirely.

The president likes to think he's a tough guy. Certainly, he likes to boast of America's military prowess and even take responsibility for it. We've got a lot of guns, ships, tanks, and planes at our disposal. Thanks to Trump, though, our country's share of discipline, duty, and honor is in ever-shorter supply.

Want more essential commentary and analysis like this delivered straight to your inbox? Sign up for The Week's "Today's best articles" newsletter here.