A decorated Navy SEAL accused of several war crimes—including fatally stabbing a teenage Islamic State prisoner in 2017—was found not guilty of murder on Tuesday.

Special Operations Chief Edward Gallagher, 39, was cleared of the most serious charges against him—including murder and attempted murder—but the seven-person jury found him guilty of wrongfully posing for an unofficial picture with a human casualty.

Gallagher, who reportedly faces a maximum sentence of four months behind bars, was expected to walk out of the courtroom Tuesday afternoon alongside his wife. He has already served 201 days.

Marc Mukasey, one of his defense attorneys, told reporters outside the courtroom that Gallagher had “tears of joy” when he heard the verdict.

“Freedom,” Mukasey, who is also President Donald Trump’s personal lawyer, said on Tuesday. “Huge victory. Huge weight off the Gallagher's. Huge victory for justice.”

The veteran, who served in eight overseas deployments, was charged in September with over a dozen offenses for allegedly shooting multiple Iraqi civilians in 2017—including a school-aged girl—and fatally stabbing an injured ISIS teen who was receiving medical treatment.

After the stabbing, Gallagher held a “reenlistment ceremony” next to the body and took photos with it, prosecutors alleged.

“He stabbed that wounded ISIS fighter to death, and then he celebrated that stabbing,” Navy prosecutor Lt. Brian John said in his opening statements. “He celebrated that murder.”

Gallagher’s case has captivated the nation and attracted the attention of several lawmakers, including President Donald Trump, who had suggested that he was considering a pardon. It’s notoriously difficult to bring charges against military officials since allegations must be vetted by enlisted superiors and “in-house” court proceedings are notoriously secret. The 39-year-old veteran was turned in by members of his platoon after allegedly bragging about several slayings.

“He systematically tried to intimidate those who had the courage to report him,” John said, adding that Gallagher began a smear campaign against his platoon, posting several names on social media and labeling them “cowards in combat.”

Navy prosecutors argued during the two-week-long trial in San Diego military court that the Navy SEAL—who was with his platoon on May 3 helping Iraqi troops drive out ISIS fighters from the city of Mosul—briefly treated the teenager in the field before stabbing him in the neck.

“We’re not ISIS. When we capture someone and they’re out of the fight, that’s it. That’s where the line is drawn,” Navy prosecutor Cmdr. Jeff Pietrzyk said during his closing statements on Monday after acknowledging the ISIS teen would have probably “done anything in his power to kill an American.”

Gallagher’s old roommate, Lt. Thomas MacNeil, testified that while helping Iraqi troops, he heard a radio transmission that an airstrike had left an ISIS fighter wounded.

“I heard Chief Gallagher announce, ‘Lay off, he’s mine,’” MacNeil said.

At the SEAL’s Mosul compound, Gallagher, who was once a Navy medic, approached the teenager to treat his collapsed lung—footage of which was shown to the jury. Once his colleague left the scene, prosecutors allege Gallagher pulled out his knife and began to “repeatedly stab the prisoner in the neck.”

“I saw him stab the prisoner. I saw him stab him in the neck,” Navy SEAL Craig Miller, who was in Gallagher’s platoon at the time, told the jury last week. Miller echoed several other members who said they’d witnessed the slaying, which was documented in the reenlistment ceremony photos shown in court.

One photograph, in which several members of the team can be seen gathered around the teenager’s body, was later attached to a text message Gallagher sent to friends, with the caption: “Good story behind this. Got him with my hunting knife.”

In another photo, Gallagher is seen holding the teenager by his hair with one hand and a knife in the other.

“The government’s evidence in this case is Chief Gallagher’s words, Chief Gallagher’s pictures, Chief Gallagher’s SEALs,” Pietrzyk said on Monday.

Gallagher’s defense team, however, argued the allegations emerged after the team returned to San Diego and stemmed from disgruntled subordinates who felt their “harsh” platoon commander didn’t deserve a Silver Star or to be promoted.

Tim Parlatore, his attorney, said the ISIS fighter died from injuries sustained in the airstrike, noting Iraqi forces had been with the “curly hair” teenager for two hours before Gallagher was able to treat him.

“This case is not about murder. It’s about mutiny,” Parlatore said in his opening statement, adding there was no trace of blood found on Gallagher’s knife. “This is a group of disgruntled sailors that didn’t like being told that they were cowards. So, they conspired to take down the Chief. They made up the story and that’s why we are here.”

The text message, Parlatore argued, was in “dark humor,” but does not prove Gallagher committed any crime.

“Was the photo in poor taste? Probably,” Parlatore told jurors in his opening statement. “Was the photo evidence of murder? No.”

In a dramatic twist last week, however, a fellow Navy SEAL testified that it was he, not Gallagher, who killed the ISIS fighter as an act of mercy to save the teenager further pain from ISIS.

The medic, Special Operator First Class Corey Scott, testified last Thursday that while Gallagher stabbed the ISIS fighter in the neck, the wound was not life threatening. Once Gallagher walked away, Scott said, he pressed his thumb over the prisoner’s breathing tube until he died to save him from possible torture by Iraqi forces.

“I knew he was going to die anyway, and wanted to save him from waking up to whatever would have happened to him,” said Scott, who was granted immunity from prosecution in exchange for his testimony.

Scott’s testimony was heavily scrutinized by prosecutors, who said that during his six interviews with Navy investigators, the medic had never so much as hinted that he committed the crime.

“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,” John said in court, accusing Scott of changing his story after receiving the immunity.

The Navy SEAL medic, after looking at Gallagher, told the jury his colleague has “a wife and family. I don’t think he should spend the rest of his life in prison.”

A Navy spokesperson told The Daily Beast on Tuesday they are “reviewing” Scott’s testimony to determine whether he will face perjury charges for lying to investigators before taking the stand.

“He [Corey Scott] changed his account to assist Chief Gallagher,” Pietrzyk said in court Monday. “He had his ‘I am Spartacus’ moment because he thought it would assist Chief Gallagher.”

Gallagher was cleared of the most serious charges against him after months of internal court turmoil and a judge’s order to remove the lead prosecutor in the case after a bungled attempt to hack into the defense lawyer’s emails to allegedly find the source of leaks to the press.

The judge, Capt. Aaron Rugh, ruled last month the hacking attempt violated Gallagher’s constitutional rights. As a result, Rugh reduced his maximum sentence to life in prison with the possibility of parole.

Unlike civilian criminal trials, military court trials are based on charges brought up by other military officials and court proceedings are considered “in-house.” The jury, which included a Navy SEAL and four Marines, plus a Navy commander and a Marine chief warrant officer, was directed and overseen by a Navy judge.