When President Harry S. Truman signed the Uniform Code of Military Justice into law just before the first Armed Forces Day in 1950, the former Army artillery captain lauded it as an achievement that assured “the democratic ideal of equality before the law is further advanced.”

For nearly seven decades, the uniform code has served the military well, providing a standardized and well-understood system for dispensing justice while also giving commanders the tools they need to maintain order and discipline.

But order and discipline are of little value to President Trump. In a show of faux patriotism, he is replacing the uniform code with a system under which verdicts are rendered by commentators on Fox News and consequences meted out from the Oval Office.

It was not only shameful but also dangerous when Trump waded into the case of Navy SEAL Edward Gallagher, who was accused of war crimes that included shooting civilians, knifing to death a captive and threatening to kill witnesses. Rather than wait for the military justice system to handle the case, Trump listened to the pleadings of Gallagher’s family on his favorite cable channel.

On Twitter, Trump praised Gallagher’s “past service to our Country.” The president ordered that the chief petty officer be released from confinement while he awaited his trial and reportedly prepared paperwork for his pardon even before proceedings began in June.

Gallagher was acquitted of all but a lesser charge of posing for photographs with the body of the dead captive. And now, Trump has disregarded the views of the Pentagon’s top leadership and ordered that Gallagher be allowed to retire at his full rank, rather than being demoted, and to keep the Trident pin that is the most cherished emblem of a SEAL.

“What I’m doing is sticking up for our armed forces and there has never been a president that’s going to stick up for them and has like I have,” Trump boasted on Monday.

But though there will be no consequences for Gallagher, the same cannot be said for justice in the armed services.

The president is making a habit of intervening in murder cases involving U.S. service members. He has offered a rationale that betrays a deep misunderstanding of the military’s mission and a contempt for the character of those who serve: “We train our boys to be killing machines, then prosecute them when they kill!”

It is not an accident that the rules are different for the military, with a higher premium on discipline and following procedure. In civilian life, a habit of not showing up on time for a shift might warrant a reprimand from the boss or even dismissal; by the rules of the military code, it can be prosecuted as a crime under Article 86, because it could jeopardize the lives of those with whom one serves.

But for the system to work, it requires that those in power keep their fingers off the scale — that they not, under a prohibition codified in Article 37(a), exercise “unlawful command influence.” The code replaced a system under which the decision to punish, or not to, rested too often on the whim of a ranking officer. That kind of discretion has since been deemed by military courts to be “the mortal enemy of military justice,” presumably even when the commander in question is the commander in chief.

As has been the case in other parts of the federal government, the Pentagon leadership has debased itself in its efforts to mollify Trump.

Defense Secretary Mark T. Esper had offered to follow Trump’s wishes and dispense with a scheduled SEAL peer-review process by which it would be determined whether Gallagher would be allowed to keep his Trident pin; Navy Secretary Richard Spencer, if Esper’s version of events is to be believed, tried to cut a side deal in which the peer review would be conducted, but the outcome guaranteed to come out in Gallagher’s favor.

It is difficult to figure out which of their two proposals was less honorable: scuttling the administrative proceeding, or turning it into a sham.

Either way, the problem traces back to Trump.

At times, the military justice system will produce an outcome with which a president disagrees, and it is then well within his power to overrule that decision.

But what Trump has done is short-circuited a process that is vital to the functioning of the military. Order and discipline can exist only if they are built on a foundation of accountability.

By substituting his own judgment for the rules by which the military operates, Trump has sent a dangerous signal that those rules don’t really matter at all.

Read more: