Image copyright Getty Images Image caption Navy Special Operations Chief Edward Gallagher with his wife, Andrea

A US Navy Seal has been found not guilty of killing a young Islamic State group prisoner in Iraq and other murder charges in a San Diego military court.

Special Operations Chief Edward Gallagher, 40, was accused of stabbing the injured teenager to death as well as randomly shooting Iraqi civilians.

He was convicted of posing with the 17-year-old's corpse, but acquitted of all other charges.

Another Seal had testified that he was the one who killed the prisoner.

Gallagher, a decorated combat veteran who served eight tours, denied all the allegations against him.

The seven-person military jury, which included five Marines and two sailors, delivered the verdict after about eight hours of deliberation.

The maximum sentence for posing for photos with a corpse is four months - but Gallagher has already served nine months in pre-trial confinement.

"We have a sentencing to do, but the maximum sentence of what they're about to sentence him on is much less than the time that they've already had him in the brig," Gallagher's lawyer, Tim Parlatore, said after the verdict, according to NBC News. "So he is going home."

The allegations against the chief had come from members of his own platoon in the special operations branch of the US Navy.

But in a surprising twist, Special Operator 1st Class Corey Scott testified earlier this month that he had asphyxiated the wounded militant while the teenager was in US custody.

The Seal medic said he had witnessed Gallagher unexpectedly begin stabbing the fighter after the two men had stabilised his injuries following an airstrike, but that the stab wounds had not appeared to be life-threatening.

When the chief walked away, Mr Scott said he had plugged the youth's air tube as an act of mercy. When asked why, Mr Scott replied, "I knew he would die anyway."

Mr Scott was granted immunity from being prosecuted for criminal charges before he testified. Prosecutors accused him of trying to protect Gallagher, alleging he had never mentioned committing the crime in previous interviews.

A sympathetic jury?

Tara McKelvey, White House reporter

In the San Diego courtroom, I watched the seven men on the jury, knowing that six of them had served in combat. The fact that most of them had gone through battle meant they were more likely to be sympathetic to the accused, a veteran of eight deployments.

The verdict shows that the jurors did not believe there was enough evidence against him for a murder conviction - but enough to find him guilty of posing with a dead body.

Overall, the verdict reflects an understanding that people can be transformed by combat and act in ways that are out of character.

This will reassure those who are concerned about being unfairly punished for their actions during wartime.

At the same time, the verdict will upset those who thought that the evidence against Gallagher was compelling. Regardless of how one sees the outcome of the trial, one thing is clear: it will be closely studied by those in the military for years to come.

The case drew the attention of some Republicans in Congress as well as President Trump, who tweeted in support of Gallagher and had reportedly weighed a pardon for him.