ABC News July 2, 2019

Navy SEAL Eddie Gallagher found not guilty of killing ISIS fighter in Iraq

WATCH: Former Navy SEAL found not guilty on murder charges

Former Special Operations Chief Edward Gallagher was found not guilty on Tuesday on charges of killing an ISIS prisoner during a deployment in Iraq, though he was convicted on a lesser charge of wrongfully posing for an unofficial picture with a human casualty.

Gallagher was facing a court-martial on charges of murdering the ISIS prisoner in 2017. He will be sentenced on the lesser charge on Wednesday.

(MORE: Navy medic shockingly claims he killed ISIS prisoner in war crimes trial)

During his war crimes trial in a San Diego courtroom, prosecutors described Gallagher as a soldier who regularly shot at civilians and accused him of killing an ISIS prisoner in 2017 by stabbing him in the neck. Defense lawyers argued that no blood evidence was ever found on Gallagher’s belongings and that there were no videos of the alleged incidents. They further argued that the platoon was disgruntled with Gallagher, and fabricated the allegations against him.

In a shocking twist during the trial, Special Operator 1st Class Corey Scott, a Navy medic, testified he saw Gallagher stab the ISIS prisoner, but that it was Scott who suffocated the prisoner to death as an act of mercy.

Sandy Huffaker/Getty Images
Navy Special Operations Chief Edward Gallagher walks into military court with his wife Andrea Gallagher, July 2, 2019, in San Diego, Calif.

Scott said he "wanted to save" the prisoner from the fate he would face if turned over to Iraqi authorities, adding "I knew he was going to die anyway," according to the New York Times.

(MORE: Trump pardons former soldier convicted of killing Iraqi)

Scott said the ISIS prisoner was stabilized after he and Gallagher treated him for wounds suffered in an airstrike, according to The Associated Press.

Gallagher allegedly stabbed the prisoner, and Scott testified that he would have lived through the stabbing had Scott not suffocated him, according to the AP. During Scott’s testimony, prosecutor Lt. Brian John reiterated several times that Scott had never said this before. John told the courtroom that Scott had immunity, and suggested he was claiming to have killed the ISIS prisoner to prevent Gallagher from going to prison. Scott responded, “Yes.”

“He’s got a wife and family,” Scott said. “I don’t think he should be spending his life in prison,” the AP reported.

(MORE: Jury to be seated in Navy SEAL's California murder trial)

The prosecution presented several text messages Gallagher sent his platoon, including one that allegedly read "I've got a cool story when I get back, I got him with my hunting knife."

"I thought everyone would be cool, next time I will do it so no one sees," Gallagher wrote to his platoon, once they allegedly turned on him. "Ready to kill the mother ------ who tells on me and I've got s--- on all of you to bring you down.”