The wife of the Navy SEAL accused of killing an injured ISIS prisoner of war in Iraq told Fox News that it has been an emotional whirlwind for her family since a military judge ordered her husband’s release.

Special Operations Chief Edward Gallagher, whose war crimes trial is set to begin June 10, walked out of pre-trial confinement Thursday. The judge said he ordered Gallagher’s release to rectify the prosecution’s unsanctioned tracking of his legal team’s emails, which violated his right to a fair trial.

“It was a huge day for us,” Andrea Gallagher told ‘America’s Newsroom’ Monday. “It was very unexpected at the end of a long trial day to hear the judge basically declare that, as a partial remedy, for all of the wrongdoing that has been done by the prosecution, that my husband was going to be released after a nine-and-a-half-month-long stint of confinement.”

“We shared the news with our children, we all had a good, long cry because it’s a very emotional situation that we have been entrapped in here,” she added.

Navy Special Operations Chief Edward Gallagher leaves a military courtroom on Naval Base San Diego with his wife, Andrea Gallagher, on Thursday, in San Diego. (AP)

NAVY SEAL GALLAGHER RELEASED FROM CUSTODY AHEAD OF WAR CRIMES TRIAL

Gallagher, 39, is facing premeditated murder and aggravated assault charges stemming from the alleged killing of a wounded ISIS prisoner and alleged instances of him intentionally firing sniper rounds at civilians in Iraq.

The months leading up to June have been marked with disputes between defense lawyers and military prosecutors over the conditions of Gallagher’s pre-trial treatment. At one point, even President Trump got involved, tweeting out that Gallagher would be moved to “less restrictive confinement while he awaits his day in court.”

Throughout his 19 years of service, Gallagher earned the Bronze Star with V for Valor twice, a Meritorious Unit commendation, and a trio of Navy and Marine Corps Achievement medals, among other recognitions and decorations. (Courtesy Sean Gallagher)

CLICK HERE TO GET THE FOX NEWS APP

Andrea Gallagher told Fox News that she is “very hopeful that this will come to an end very soon.”

“It’s obscene and unheard of that we should treat service members of his caliber – has been deployed eight times in combat zones, fought the war on terror for the past two decades – he should be retiring next month and yet he’s been entrapped in this nightmare and prosecuted, and more like persecuted by our own government,” she said.