The Navy announced it was considering kicking Chief Petty Officer Edward Gallagher out of the SEALs Wednesday even though President Donald Trump had recently reversed his demotion. It was a stunning move.

Trump clearly seemed outraged by the prospect. He tweeted in response Thursday morning that “the Navy will NOT be taking away Warfighter and Navy Seal Eddie Gallagher’s Trident Pin” (the official sign of membership in the SEALs), though whether that will lead to the cancellation of the Navy's review remains unclear.

After years of demanding more of its special ops forces while dismissing worrying reports from their ranks, the Pentagon can no longer deny it has a major problem on its hands.

The Navy’s willingness to try to discipline a rogue SEAL despite him having received presidential clemency demonstrates the depths of the military’s understanding that it needs to get this and other elite units in order. After years of demanding more of its special ops forces while dismissing worrying reports from their ranks, the Pentagon can no longer deny it has a major problem on its hands — and that it must take steps to curb out-of-control behaviors it’s long preferred to overlook.

In the current case, Gallagher received a summons Wednesday for a peer review to decide whether to recommend his removal from the SEALs, along with three officers accused of covering for him. The announced review came five days after Trump reversed Gallagher’s demotion to petty officer first class.

The decision to continue with the review despite Trump’s action — Gallagher’s attorney called it an “act of insubordination” — was reportedly approved by senior leaders in the Navy, in particular the commander of the Naval Special Warfare branch, Rear Adm. Collin Green.

The Navy’s effort, however, isn’t surprising because the military is deadly serious about staunching a crisis of discipline that has consumed the Naval Special Warfare community in recent years. A succession of scandals suggest the mounting demands placed on special operations units — elite soldiers from all four services assigned to perform missions that require extra discretion and finesse, such as the Army’s Green Berets and Marine Raiders — are taking their toll.

In 2017, Army Green Beret Staff Sgt. Logan Melgar was strangled to death by Navy SEALs and Marine Raiders in Mali who were attempting to arrange for him to be sexually assaulted in retaliation for ditching them at a party.

The same year, an investigative report by The Intercept citing sources within the unit revealed SEAL Team 6 — the elite within the SEAL elite — had frequently mutilated enemy corpses as a symbolic rite of passage by “canoeing” their skulls with bullets or using hatchets furnished by an officer. Deliberately mutilating corpses is considered a war crime by the U.S. military and under international law.

In 2018, a half-dozen members of SEAL Team 10 tested positive for cocaine. That year, the suicide rate in special forces units tripled.

In 2019, the Navy withdrew a platoon of SEAL Team 7 from Iraq because members of the unit were drinking on duty and one senior member allegedly raped a fellow servicewoman.

In March, the Pentagon began a professional ethics review of the entire Special Operations Command at the urging of Congress, on the heels of a review ordered by the Army late in 2018.

Units like the SEALs work in small, close-knit communities. Frequently, they are embedded in remote areas with local allies and are accorded greater independence than is typical for conventional forces.

Since the 9/11 attacks, the ranks of these units have more than doubled, and they have seen near-constant deployment in Afghanistan, Africa and the Middle East to the point they are becoming dangerously dependent on sleep and pain medications.

In these theaters, they more frequently see dangerous, close-quarters combat with enemy forces than regular soldiers. As a result, special operations units have also suffered disproportionately heavy casualties.

Within hierarchical and intimate institutions like the military, the impetus to bury troubling reports that threaten careers, unit reputations and internal cohesion can be overwhelming. Junior members of SEAL Team 7, for instance, were reportedly pressed to keep quiet about their allegations when they informed their immediate superior about them, and only had their concerns addressed when they went far above his head to the Naval Special Warfare command.

These types of concerns informed a July op-ed in USA Today penned by three former military attorneys begging Congress to directly investigate the breakdown of discipline in the ranks, arguing the earlier military review, which “did not identify any gaps,” had proven inadequate. In August, Green ordered an additional three month ethics review of the Naval Special Warfare branch.

The seriousness with which Green is treating this crisis is laudable. But it took time for the Pentagon to accept the extent of the problem and the need to change its behavior.

The example of Gallagher is instructive. He is a decorated member of SEAL Team 7 even though he has a long list of allegations and attempted prosecutions for various misconduct. While members of the unit repeatedly reported concerns about Gallagher, such as accusations he was randomly shooting at unarmed civilians and boasting about it to their superiors, those complaints were long suppressed.

As far back as 2010, Gallagher was investigated — and cleared — of killing a girl being used as a human shield by an insurgent in 2010. Four years later, he allegedly attempted to run over a police officer in an altercation; the degree of punishment he received for that incident remains unclear.

In 2019, he was finally tried on accusations from his fellow squad mates that while perched in a tower with a sniper rifle, he needlessly shot an unarmed young girl and old man in Iraq in 2017 and repeatedly stabbed a noncombative captured Islamic State militant group fighter in the throat.

SEALs also claimed Gallagher threatened to murder witnesses after the allegations became public, though his trial was compromised by prosecutorial misconduct and in the end he was only found guilty of posing with a corpse— the crime for which he was originally demoted before Trump intervened.

Defenders of Gallagher and other U.S. soldiers accused of war crimes argue that ordinary Americans can’t possibly understand what it’s like in a war zone, and that we don’t know what decisions we’d make when any civilian could turn out to be someone out to kill you.

They’re right. But other soldiers who’ve experienced the horrors and moral conundrums of war can, and in many cases, including Gallagher’s, they’ve been the ones appealing for discipline of those around them.

The dangerous conditions they work in make it that much more important for the military to maintain discipline by punishing behaviors that threaten the mission.

While it’s true that soldiers on the front line must deal with stress and ambiguous life-or-death situations that most of us cannot fathom, we dishonor soldiers when we imply they can’t distinguish right from wrong, and when we dismiss the courage of those who defied institutional resistance to speak out and report war crimes.

And the dangerous conditions they work in make it that much more important for the military to maintain discipline by punishing behaviors that threaten the mission, fellow soldiers and the civilian populations they are there to protect. Doing so also safeguards potential perpetrators from the lingering effects of “moral injury,” the psychological trauma of having inflicted unjustified violence on innocents.

It might have taken Pentagon leaders too long to to acknowledge the bad behavior in their ranks, but they now realize they need to take action to protect their institutional integrity, and protect the lives of American soldiers and civilians abroad.

Unfortunately, Trump’s continuing intervention in the case only serves to undermine that effort.

Related: