SAN DIEGO — A Navy SEAL who was acquitted of killing a wounded Islamic State captive but convicted of posing with the corpse was sentenced by a military jury Wednesday to a reduction in rank and four months of confinement.

A judge, however, credited Special Operations Chief Edward Gallagher with enough time already spent in custody to ensure he won’t be locked up.

The sentence will not go into effect until it is approved by the commanding officer overseeing the court-martial.

Earlier, Gallagher addressed the jury that had acquitted him Tuesday of murder, attempted murder, and other counts stemming from an incident during a 2017 deployment to Iraq.


‘‘I put a black eye on the two communities that I love — the US Marine Corps and the US Navy — specifically the SEAL community,’’ he said.

The jury reduced Gallagher’s rank by one grade to petty officer first class and ordered his monthly pay cut by $2,697 for four months.

The judge then modified the sentence, capping the pay cut at two months and giving Gallagher 60 days’ credit for being held in overly harsh conditions before being tried and being deprived of treatment for a traumatic brain injury.

Gallagher also got credit for 201 days of pretrial confinement.

A Navy prosecutor had asked only for a reduction in rank, not confinement. The defense recommended no punishment.

Gallagher told the jury he was fully responsible for his actions on the day he took photos with the body of the 17-year-old militant.

The photos were taken after Gallagher and other SEALs provided medical treatment for the captive who was wounded in an airstrike in 2017 and handed over by Iraqi forces.

The prosecutor, Lieutenant Brian John, said Gallagher was the platoon chief and should not have been the centerpiece of the photos in which nearly all the members posed with the body. John said Gallagher should have stopped the photos from being taken.


‘‘For that reason, he no longer deserves to wear anchors,’’ the prosecutor said.

John said the photos had the potential to be used as propaganda by Islamic State and be harmful to US forces overseas.

The verdict clearing Gallagher of the most serious charges was met with an outpouring of emotion.

President Trump, who intervened earlier this year to have Gallagher moved from the brig to less restrictive confinement, tweeted congratulations to the SEAL and his family.

‘‘You have been through much together. Glad I could help!’’ the president wrote.

The outcome delivered a major blow to one of the Navy’s most high-profile war crimes cases and exposed a generational conflict within the ranks of the elite special operations forces.

Asked in an interview Wednesday on Fox & Friends what his message might be to future Navy SEALs, Gallagher said he would tell them that ‘‘loyalty is a trait that seems to be lost. . . . You’re there to watch your brother’s back, and he’s there to watch your back.’’

Speaking of his accusers, Gallagher said, ‘‘this small group of SEALs that decided to concoct this story in no way, shape, or form represent the community that I love.’’

The prosecution said Gallagher was incriminated by his own text messages and photos.

One image shows him clutching the hair of the corpse with one hand and holding a knife in another.


‘‘Got him with my hunting knife,’’ Gallagher wrote in a text with the photo.

The defense said it was just gallows humor and pointed out that almost all platoon members who testified against him also posed with the corpse.