A Navy SEAL charged with murder in the stabbing of a teenage Iraqi war prisoner was moved from the brig to a less-restrictive barracks Saturday, hours after President Donald Trump said he would help clear the way for the transfer.

Trump tweeted earlier in the day that Special Operations Chief Edward Gallagher shouldn't be held in the brig while he awaits trial on war crime allegations because of his past service to the nation.

Gallagher's attorney, Phil Stackhouse, confirmed to NBC affiliate KNSD in San Diego late Saturday that he had been moved to the barracks at Marine Corps Air Station Miramar. A Navy spokesperson told the station the move would take place by the end of the day Saturday.

"Chief Gallagher, his family and the team are very thankful for the President's action directing Chief Gallagher's release from pretrial confinement," Stackhouse said in an email to the station.

Special Operations Chief Edward Gallagher via Facebook / @freeeddieg

Gallagher had been detained at the Naval Consolidated Brig Miramar since Sept. 11.

He is accused of fatally stabbing an Islamic State prisoner under his care in 2017 in what prosecutors say was a premeditated act. The prisoner, estimated to be about 15 years old, was slashed in the neck and body, they said.

In honor of his past service to our Country, Navy Seal #EddieGallagher will soon be moved to less restrictive confinement while he awaits his day in court. Process should move quickly! @foxandfriends @RepRalphNorman — Donald J. Trump (@realDonaldTrump) March 30, 2019

Naval Criminal Investigative Service Special Agent Joe Warpinski said during a hearing that a witness, a SEAL medic, told him Gallagher "walked up without saying anything at all" and started stabbing the boy.

Navy prosecutors also say Gallagher posed for photos with the teen's body during a re-enlistment ceremony.

Gallagher pleaded not guilty in January to charges of premeditated murder and other offenses, including opening fire on crowds of Iraqi civilians and shooting a female and male in separate incidents. His trial is set for May 28.

A group of 40 members of Congress asked U.S. Navy Rear Adm. Yancy B. Lindsey in a letter Tuesday to "reevaluate the decision to place Chief Gallagher in pre-trial confinement and analyze whether a less severe form of restraint would be appropriate as his trial approaches."

One of his biggest supporters is embattled U.S. Rep. Duncan Hunter, a San Diego-area Republican. His spokesman, Michael Harrison, said in an email Saturday that Trump's vow to move Gallagher from the brig is "great news."

His wife, Andrea Gallagher, said in a statement Saturday that she appreciates the efforts of Trump and the Congress members to release Gallagher while he awaits trial.

"As a wife and mother I want to personally thank President Trump for having mercy on my husband and our family by exercising not only compassion but common sense in this shameful travesty of justice we have faced for over 7 months," she said.

"My husband, children, myself and our family have suffered needlessly for so long and and this is a joyous moment in an otherwise very horrific nightmare."