SAN DIEGO (AP) — A decorated Navy SEAL was acquitted Tuesday of murder in the killing of a wounded Islamic State captive under his care in Iraq in 2017.

The verdict was met with an outpouring of emotion as the military jury also cleared Special Operations Chief Edward Gallagher of attempted murder in the shootings of two civilians and all other charges except for posing for photos with the body of the dead captive.

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

Gallagher cried “tears of joy, emotion, freedom and absolute euphoria,” defense lawyer Marc Mukasey said. Family and friends clutched each other in relief in the courtroom.

“Suffice it to say this is a huge victory,” Mukasey said outside court. “It’s a huge weight off the Gallaghers.”

Gallagher, dressed in a white uniform sporting a chest full of medals, told reporters outside court that he was “happy and grateful.”

“I thank God, my legal team and my wife,” he said.

He declined to address questions about his SEAL team. His lawyers said he might talk after the jury decides his sentence, which could happen as early as Wednesday.

“We just want to celebrate today,” said his wife, Andrea Gallagher.

Defense lawyers said Gallagher was framed by junior disgruntled platoon members who fabricated the allegations to oust their chief. They said there was no physical evidence to support the allegations because no corpse was ever recovered and examined by a pathologist.

The prosecution said Gallagher was incriminated by his own text messages and photos, including one of him holding the dead militant up by the hair and clutching a knife in his other hand.

“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.

Gallagher’s family championed a “Free Eddie” campaign that won the support of dozens of congressional Republicans who brought the case to the attention of President Donald Trump.

Trump had Gallagher moved from the brig to more favorable confinement at a Navy hospital this spring and was reportedly considering a pardon for him.

Gallagher could face up to four months imprisonment for the one conviction along with a reduction in rank, forfeiture of two-thirds of his pay and a reprimand.

Having already served nearly seven months in jail awaiting trial, defense lawyers said they expected the same jury would free him.

The case provided a rare glimpse of a deep division in the insular and respected SEAL community. The group of men who spoke up about Gallagher referred to themselves in a chat group as “The Sewing Circle” and saw themselves as a counter to an old guard that would adhere to a code of silence even in the face of war crimes.

Both sides told jurors that witnesses had lied on the stand and it was their duty to find the truth.

Gallagher, 40, a 19-year veteran deployed eight times, did not take the stand.

The panel of five Marines and two sailors, including a SEAL, were mostly seasoned combat veterans who served in Iraq and several had lost friends in war. They deliberated fewer than eight hours over two days.

They had to weigh whether Gallagher fatally stabbed the war prisoner on May 3, 2017, as a kind of trophy kill, or was the victim of allegations fabricated to prevent him from being awarded a Silver Star and being promoted.

Under the military system, two-thirds of a jury needs to agree to convict. In Gallagher’s case, that meant five of seven jurors. They could have convicted Gallagher on lesser charges, such as attempted murder.

Vote tallies are not made public in military cases, so it not known whether any of the jurors voted for a conviction on the most serious charges

Gallagher was also charged with attempted murder in the shootings of two civilians — an old man and young girl — and four other charges that included the unlawful discharge of his firearm by shooting at noncombatants, impeding an investigation by discouraging platoon members from reporting his criminal actions, retaliating against those who did and wrongfully posing with a casualty.

The two-week trial included testimony from nearly a dozen SEALs, including Special Operator Corey Scott, a medic like Gallagher, who told the court that he saw the chief stab the militant in the neck but stunned the court when he said he was the one who ultimately killed the prisoner by plugging his breathing tube with his thumb as an act of mercy.

Seven SEALs said Gallagher unexpectedly stabbed the captive moments after he and the other medics treated the detainee who was wounded in an airstrike that morning outside Mosul. One SEAL, in addition to Scott, said he saw Gallagher plunge his knife into the prisoner’s neck.

An Iraqi general who handed the wounded prisoner to the SEALs testified that Gallagher did not stab the boy. And Marine Staff Sgt. Giorgio Kirylo said after the militant died that he moved the body to take a “cool guy trophy” photo with it and saw no stab wounds on his neck.

Gallagher’s attorneys said there were a number of things that could have caused the militant’s death, including internal injuries from the blast.

Most of the witnesses were granted immunity to protect them from being prosecuted for acts they described on the stand.

Lt. Jacob Portier, the officer in charge of the platoon, has been charged separately for overseeing Gallagher’s re-enlistment ceremony next to the corpse and not reporting the alleged stabbing.

The Navy is still pursuing the case against Portier, defense lawyer Jeremiah J. Sullivan III said.

The trial followed months of turmoil in one of the Navy’s most prominent war cases, including the removal of the Navy’s lead prosecutor after it was discovered he had tracked the emails of the defense team to find the source of a news leak.

The judge in response to that freed Gallagher from confinement and lowered the maximum sentence he could have faced if convicted of murder.

After the verdict was announced, Gallagher’s friends exited the courthouse with their hands in the air and yelled “Free Eddie.”

Gallagher’s three defense lawyers followed and gave each other high fives.

___

Melley contributed from Los Angeles.

Copyright 2020 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.