A decorated Navy SEAL was brought into court in shackles in San Diego Friday, cheered by supporters who call him a hero. But he's also accused by the military of being a war criminal.

Special Operations Chief Edward Gallagher was arraigned on charges of murdering a wounded ISIS fighter during the bloody 2017 battle for the Iraqi city of Mosul. According to the charge sheets, Gallagher, a trained medic, stabbed the teenage fighter in the neck and body while other members of the SEAL team were treating his wounds. He then posed for photographs with the body and conducted his own reenlistment ceremony standing over it.

This 2018 photo provided by Andrea Gallagher shows her husband, Navy SEAL Edward Gallagher. Andrea Gallagher / AP

In court, Gallagher pleaded not guilty to the charges. His wife, who attended the hearing, has said her husband was only trying to save the injured fighter's life.

"He had a severed artery in his leg. My husband is a Navy corpsman so he did medical procedures on him," Andrea Gallagher said.

Gallagher is also accused of taking potshots at civilians and threatening to retaliate against any members of his team who reported him.

The charge sheets paint a picture of a highly trained commando run amok on his eighth combat tour. He was arrested last September at a clinic that treats combat veterans for post traumatic stress and traumatic brain injury.

The court martial is scheduled to begin next month. If convicted, Gallagher faces a maximum sentence of life without parole.