And President Trump has indicated that he is “looking” at pardoning “two or three” service members accused or convicted of war crimes. Mr. Trump did not give their names, but Navy officials suggested that one of them may be Chief Gallagher.

“It’s a little bit controversial,” Mr. Trump told reporters on May 24. “It’s very possible that I’ll let the trials go on, and I’ll make my decision after the trial.” He added: “Some of these soldiers are people that have fought hard and long. You know, we teach them how to be great fighters, and then when they fight, sometimes they get really treated very unfairly.”

Chief Gallagher, 40, was on his fifth deployment with the SEALs in 2017, leading a platoon that was supporting Iraqi troops as they sought to drive Islamic State fighters out of the city of Mosul.

According to a Navy investigative report, platoon members saw their chief at first as an experienced leader with a reputation as one of the top chiefs in the SEALs.

But once they were in Mosul, platoon members told investigators, the chief became frightening. They said he proposed dangerous missions that had no clear purpose, ordered SEALs to fire rockets and machine guns at neighborhoods with no clear targets, and spent much of his time in a hidden sniper perch, firing far more often than any of the platoon’s snipers.

Snipers told investigators they saw Chief Gallagher shoot a school-age girl in a flower-print hijab who was walking with other girls on a riverbank, and an unarmed man in a white robe with a wispy white beard. Both were hundreds of yards away and posed no threat, the snipers said.

SEALs also told investigators that Chief Gallagher stabbed to death a wounded ISIS fighter that the platoon was holding captive. A few days later, the investigative report said, the chief texted a photo of the dead body to a fellow SEAL, saying, “Good story behind this, got him with my hunting knife.”