Navy Special Operations Chief Edward Gallagher is standing trial for allegedly stabbing an unarmed prisoner to death, firing on innocent civilians, and obstruction of justice.

Amid testimony from his fellow Navy SEALs, one unexpectedly confessed to killing the prisoner Gallagher is accused of murdering.

Corey Scott, according to the San Diego Union-Tribune, said that while Gallagher stabbed the boy in the neck, it was he that killed him by holding his hand over the breathing tube and asphyxiating the prisoner.

Visit Business Insider's home page for more stories.

In a shocking twist in the war crimes trial of Navy Special Operations Chief Edward Gallagher, a fellow SEAL who was called to testify admitted that it was he, not the defendant, who killed the prisoner of war Gallagher is accused of murdering, according to the San Diego Union-Tribune.

Gallagher is on trial in San Diego for allegedly killing an unarmed ISIS fighter with a hunting knife and firing on civilians with a sniper rifle while deployed in Iraq, as well as intimidating fellow SEALs in an attempt to silence them. He has pleaded not guilty, and now his fate is in the hands of the jury.

On Tuesday, Navy prosecutors presented a text message sent by the defendant showing a photo of Gallagher posing with the body of the ISIS prisoner, a teenage boy. The accompanying message read: "Good story behind this, got him with my hunting knife."

Two of his former comrades, Dylan Dille and Craig Miller, took the stand at Gallagher's court martial Wednesday.

Miller said while a medical team that included Gallagher was treating the boy, he saw Gallagher suddenly stab the prisoner in the neck, "right here on the right side in the jugular vein." Dille testified Wednesday that Gallagher later confronted teammates who were upset about the incident, telling them that "this was just an ISIS dirtbag."

On Thursday, another SEAL testified that while Gallagher stabbed the prisoner, it wasn't Gallagher that actually killed him. Special Operator 1st Class Corey Scott said that he put his hand over the tracheal tube and suffocated the captured ISIS fighter, who was believed to be about 15 years old.

He said that the prisoner would have lived if he hadn't done what he did. The prosecution, caught off guard by Scott's testimony, accused him of lying, saying that he was intentionally misrepresenting the truth to keep Gallagher out of jail.

"He's got a wife and family," Scott said, according to the Associated Press. "I don't think he should be spending his life in prison."

Scott testified with granted immunity, meaning that he cannot be charged with a crime for his confession. It is unclear exactly how his testimony will affect the direction of the trial or the charges against Gallagher, but it is another unexpected development in a high-profile case full of twist and turns.

"The prosecution has a tough enough hill to climb. There's no body, no autopsy, no physical evidence. The only way they can prove it is through the testimony of other witnesses like Scott," Gary Solis, a former Marine Judge Advocate General, told INSIDER. "And, if Scott now says he administered the fatal blow, then he is the one who committed murder."

"That still doesn't let Gallagher off the hook," though, Solis added, speculating that the prosecution will likely fall back on lesser included offenses, which could include attempted murder or aggravated assault, among other possible offenses.

"I think the prosecution will be happy at this point if they can get out of the courtroom without a not guilty finding," he said.