Image copyright Reuters Image caption Navy SEAL Special Operations Chief Edward Gallagher is accused of war crimes

A US Navy Seal testifying at the war crimes trial of Special Operations Chief Edward Gallagher has said he was behind the death of an Iraqi teenager.

Special Operator 1st Class Corey Scott stunned the San Diego courtroom when he said he asphyxiated the wounded Islamic State (IS) militant.

Chief Gallagher is accused of stabbing to death the injured captive as well as randomly shooting Iraqi civilians.

He has pleaded not guilty and denied all the allegations against him.

Mr Scott, a combat medic, was given immunity in exchange for his testimony.

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

When the chief walked away, Mr Scott said he plugged the youth's air tube as an act of mercy.

Mr Scott said the injured victim may have survived the stabbing, but he decided to plug his air tube with his thumb in the belief that he would be tortured by Iraqi forces if he survived.

Image copyright Facebook/ Eddie Gallagher Image caption Chief Gallagher has done eight tours of combat duty in the US Navy

"I knew he was going to die anyway," Mr Scott told the courtroom. "I wanted to save him from waking up to whatever would have happened to him."

He said it is his belief that Mr Gallagher is not responsible for killing the young militant.

The bombshell claim came on cross-examination, after he already testified to seeing Mr Gallagher stab the teenager below the collarbone then walk away.

Skip Twitter post by @PattersonNBC MORE: Witness is Special Operator First Class Corey Scott who says he saw Gallagher stab the detainee once, but that he lived. He then admitted to covering the ISIS fighter’s breathing tube until death. Prosecution, defense, everyone caught completely off guard. @NBCNews pic.twitter.com/Na0UEmXhYC — Steve Patterson (@PattersonNBC) June 20, 2019 Report

The prosecutor, Lt Brian John, accused his own witness of lying to defend Mr Gallagher.

"You can stand up there, and you can lie about how you killed the ISIS prisoner so Chief Gallagher does not have to go to jail," Mr John said. He pointed out that Mr Scott had never claimed he killed the prisoner in prior interviews.

"He's got a wife and family," Mr Scott responded. "I don't think he should be spending his life in prison."

Image copyright Reuters Image caption Navy SEAL Special Operations Chief Edward Gallagher at court with his wife Andrea and brother Sean (centre)

Mr Scott had wished to plead the Fifth Amendment, which would have allowed him to avoid testimony that may incriminate him, but a judge rejected that request and instead offered immunity.

The testimony comes after former Seal Dylan Dille testified that he had seen several instances of Mr Gallagher firing at civilians, once killing an old man.

Mr Dille added that he had heard Mr Gallagher refer to the teenage militant as "just an ISIS dirtbag" in a reference to the IS terror group.

Mr Gallagher's defence has claimed that the allegations are fabricated by his subordinates who oppose his leadership.