Last week brought the grim news that an American Green Beret officer had been charged with murdering a detainee in Afghanistan. Military courts, fortunately, have vast experience dealing with allegations of this kind. But on Sunday, the military got a reminder that under this president, nothing goes according to longstanding conventions.

Donald Trump tweeted, “At the request of many, I will be reviewing the case of a ‘U.S. military hero,’ Major Matt Golsteyn, who is charged with murder. He could face the death penalty from our own government after he admitted to killing a Terrorist bomb maker while overseas.” A case that was laden with difficulty suddenly became even more fraught.

In 2010, two Marines were killed by a roadside bomb in Helmand province. Army Special Forces captured a man they suspected of building the bomb. While in custody, he was identified as a Taliban fighter by an Afghan tribal leader, who voiced fear for his life if the captive was released.

Maj. Matthew Golsteyn suspected that if the alleged bomb maker were sent to a detention facility, he might indeed go free. Golsteyn chose to eliminate that possibility by killing him — a deed he reportedly acknowledged in a 2011 CIA job interview. After an investigation, the Army didn’t charge him but stripped him of his Silver Star and his Special Forces tab.

But that was not the end of the case. In a 2016 interview with Fox News, Golsteyn said he had killed the detainee. The Army reopened its investigation and eventually charged him with premeditated murder, which is punishable by death.

Golsteyn has many defenders among soldiers who served with him, and his lawyer blames “political correctness” for the charges. It’s not hard to understand why he made the fatal decision. But the summary execution of a prisoner defies military law and treaties the U.S. has signed.

That task was complicated by Trump’s tweet, because everyone in the military serves under his command. “Unlawful command influence” is forbidden under military law, and University of Texas law professor Steve Vladeck told the website Law & Crime, “Any time a president expresses an opinion about a specific pending prosecution, he is coming dangerously close to UCI.”

Trump has previously made the mistake of expressing himself too freely about such matters. As a candidate, he called Sgt. Bowe Bergdahl a “traitor” for leaving his Army base in Afghanistan. When Bergdahl was convicted of desertion and endangering his fellow soldiers, a military judge cited the president’s remarks as mitigating evidence before imposing no prison time.

President Obama made a similar mistake in 2013 when he said service members who commit sexual assault should be “prosecuted, stripped of their positions, court martialed, fired, dishonorably discharged. Period.” A military judge found the comment to be unlawful command influence and ruled that, because of it, two defendants could not be punitively discharged if convicted.

If Trump thinks Golsteyn did nothing worthy of punishment, he is always free to grant him a pardon. Maybe that is all he was alluding to in his tweet. But we’d prefer to see the case proceed normally so the facts can be brought forth in an orderly way.

In most cases, Trump’s tweeting amounts to nothing more than diversion and distraction. In this one, the interests of justice as well as military discipline argue for him to keep his opinions to himself.