A Navy SEAL awaiting trial for murder will get to go home.

A military judge freed Special Operations Chief Edward Gallagher on Thursday ahead of his trial, citing interference by prosecutors, according to the AP.

Judge Capt. Aaron Rugh said he was freeing Gallagher, who is charged with murdering an injured ISIS prisoner, because Navy prosecutors were interfering with Gallagher's Sixth Amendment right to counsel.

“I feel like it’s a small victory on the way to the larger victory,” Andrea Gallagher said outside court while her husband stood quietly by. “He’s now free because of the misconduct by these prosecutors.”

Photo of Navy SEAL Eddie Gallagher after being released from pre-trial confinement: pic.twitter.com/CpgXzQN7Mk — Kristina Wong 🇺🇸 (@kristina_wong) May 31, 2019

Timothy Parlatore, who represents Gallagher, told the Washington Examiner he suspects Navy prosecutor Cmdr. Chris Czaplak had embedded tracking software in emails to defense lawyers and a reporter to try to root out leaks to the media.

Gallagher's lawyers have pressed for the case to be thrown out over the interference, but Rugh has not decided on it.

The 39-year-old pleaded not guilty to the stabbing murder of an injured teenage ISIS fighter while deployed to Iraq in 2017. He also denies shooting two civilians and opening fire on crowds.

Gallagher's platoon commander, Lt. Jacob Portier, was charged with conduct unbecoming of an officer after he allegedly conducted Gallagher's reenlistment ceremony next to the fighter's corpse.

In March, President Trump ordered the transfer of Gallagher from a Navy brig to a less-restrictive hospital complex, "in honor of his past service to our Country."

Trump is also considering issuing a pardon for Gallagher before the trial even starts. The idea of a pardon has split the Navy SEAL community, with defenders saying the Navy has railroaded Gallagher, while other SEALs have accused Gallagher of killing non-combatants and committing other war crimes.

Gallagher's trial, initially set for May 28, will begin in San Diego on June 10.