San Diego (CNN) Decorated Navy SEAL team leader Eddie Gallagher was acquitted of nearly all charges in the death of an ISIS prisoner in Iraq, including premeditated murder.

But a jury of seven soldiers in his court-martial found him guilty of posing for a photo with the 12-year-old ISIS fighter, an offense carrying a maximum sentence of four months.

Navy prosecutors said that Gallagher took the photo after fatally stabbing the detainee while he was being treated by US medics. The verdict marked the culmination of a military trial in which fellow SEALs offered contrasting accounts of Gallagher's behavior in 2017 in Mosul, Iraq.

Navy SEAL Edward Gallagher leaves military court in San Diego with his wife Andrea Gallagher on Tuesday.

Two witnesses testified for the prosecution that they saw Gallagher fatally stab the victim. One of them, however, altered his story for the first time on the stand and said that although Gallagher stabbed the victim, he caused the victim's death by suffocating him, not Gallagher.

The jury will return Wednesday to deliberate his sentence after hearing testimony on his behalf from two doctors, a family friend and a colleague.

Read More