Commander Breisch, who was the troop commander and Lieutenant Portier’s superior during the Iraq deployment, was also accused of not reporting the crimes, but was never indicted, according to a Navy official who spoke on condition of anonymity to discuss a personnel matter.

Commander Breisch had served with Chief Gallagher years before on a deployment to Afghanistan, and described their relationship to investigators as close. When SEALs from Chief Gallagher’s platoon took their accounts of the chief’s actions to Commander Breisch, he did not immediately investigate, according to a Navy investigation report, and instead warned platoon members that pressing a criminal investigation could ruin their careers and they should “decompress” and “let it go.”

Lieutenant MacNeil was the assistant to Lieutenant Portier in Iraq and the most junior officer in the platoon. He was one of six SEALs who came forward to report Chief Gallagher for war crimes. During the chief’s court-martial, defense lawyers pointed out that Lieutenant MacNeil had consumed alcohol while deployed in Iraq — which was against regulations — and appeared in a photo with Chief Gallagher and the corpse of the captive.

A Navy Special Warfare officer, speaking on condition of anonymity to discuss the case, said that however inexperienced Lieutenant MacNeil may have been, he was an officer and thus was expected to show better judgment.

The commander of the SEALs, Rear Adm. Collin Green, pushed for the chief and the three officers to be stripped of their Tridents as part of a larger effort to restore accountability and tighten discipline in the SEAL teams after a series of high-profile scandals.

But Mr. Trump’s intervention ended the expulsion effort, and many in the SEALs now wonder whether Admiral Green may soon be relieved.

Navy officials said the admiral was concerned about the corrosive effect of Chief Gallagher’s behavior on order and discipline in the force, which he referred to as the “Gallagher effect.”