The defendant’s teammate said he killed an unarmed Daesh teenage captive, taking the blame from the Navy SEAL accused of a number of war crimes, which include the indiscriminate shooting and sniping of civilians.

A prosecution witness testifying during the court martial of Edward Gallagher, a Navy SEAL accused of murdering an unarmed teenage Daesh fighter, plunged the entire courtroom into shock when he claimed it was he who did the killing.

According to NBC News, the revelation “seemed to stun” people in the courtroom and led to the prosecutor accusing the witness of lying.

Edward Gallagher, a Navy SEAL, is being court martialed for a plethora of war crimes, including firing his sniper rifle indiscriminately at civilians, as well as spraying residential areas with gunfire while knowing no enemy forces were in the vicinity. But one case stands out as the most prominent and documented.

According to earlier testimony, a teenage Daesh fighter was taken into US custody with a minor leg wound. A medic was treating the captured fighter when he needed to step out briefly. When he returned, he saw Gallagher stabbing the prisoner in the neck with his hunting knife. Later that day, when his teammates confronted Gallagher, he rebuffed them saying: “This was just an ISIS dirtbag.”

During a hearing Thursday, US Navy SEAL Corey Scott admitted that he saw Gallagher stabbing the teenager in the neck, but argued that the stabbing did not kill him. According to Scott, the unconscious fighter still had a pulse and was alive. When asked what happened next, Scott said he himself suffocated the captive until he died.

“The stabbing I saw, yes," Scott said, according to NBC. "He would have survived."

He justified his decision to finish the teenager, saying it was a mercy kill, because he “knew how he would be treated if he was turned over to the Iraqis,” according to NBC. He said he had witnessed Iraqi forces raping, torturing and killing prisoners.

“I knew he was going to die anyway, and wanted to save him from waking up to whatever would have happened to him,” Scott said, according to The New York Times.

After those present in the courtroom got over their initial shock, prosecutors accused Scott of lying, saying he never made this claim before and claimed he only made a shocking revelation in order to shield Gallagher from jail. The defence, however, said prosecutors never asked how the captive died and simply assumed the stabbing killed him, NBC reports.

Scott said he made his confession because he didn’t want an “innocent man, with a wife and kids,” to go to jail.

The trial is expected to last up to three weeks, an NBC San Diego report says. The case has already attracted the attention of several members of Congress and President Donald Trump, who said he is considering a pardon for Gallagher.

Daesh is a terrorist organisation outlawed in Russia and many other countries.