A group of 40 lawmakers is urging Navy officials to free Special Warfare Operator Chief Edward “Eddie” Gallagher from confinement ahead of his trial on war crimes charges, calling his imprisonment an insult to the sacrifices his family has made.

“(Gallagher) risked his life serving abroad to protect the rights of all of us here at home,” Rep. Ralph Norman, R-S.C., said at a Capitol Hill rally on Thursday. “He had not one deployment, not two deployments, but eight deployments … We urge this be fixed In light of his bravery, his patriotism and his rights as an American citizen.”

Gallagher is charged with a host of crimes connected to his 2017 deployment to Iraq with SEAL Team 7, including stabbing to death a wounded Islamic State prisoner of war and shooting at innocent civilians with his sniper rifle.

The war crimes case has expanded beyond his team to the larger special operations community, with allegations that Gallagher urged fellow SEALs to obstruct justice or retaliate against junior sailors who spoke to law enforcement officials.

Gallagher was arrested last September and has been held in San Diego’s Naval Consolidated Brig Miramar “with sex offenders, rapists and pedophiles,” according to lawmakers.

A petition by his legal team to release him to his home or a less restrictive environment was denied in January.

The lawmakers want that idea revisited.

“We ask you weigh this decision, given the terrible message Chief Gallagher’s confinement sends to our warfighters, that they can be confined behind bars away from their family, legal defense and community for nine months before their day in court,” the letter to former Navy Region Southwest Rear Adm. Yancy “Lurch” Lindsey states.

“To confine any service member for that duration of time, regardless the authority to do so, sends a chilling message to those who fight for our freedoms.”

Family members who attended Thursday’s event charged that Gallagher has been denied medical treatment for post-traumatic stress disorder during his confinement.

His wife, Andrea, labeled it “unlawful overreach by the government.”

The letter does not speak to Gallagher’s innocence or guilt, but says his confinement is harming his ability to build a defense against the charges.

But several of the lawmakers who signed the message expressed confidence in Gallagher’s innocence, calling him a “warrior hero.”

Rep. Duncan Hunter, R-Calif., and an Iraq war veteran, continues to call on President Donald Trump to intervene in Gallagher’s case.

“I would ask for this whole case to be dropped,” he said. “It’s time we stop persecuting our warriors who go overseas and do what we ask them to do. Maybe if we persecuted them less, we wouldn’t be in Afghanistan 18 years later, still with no end in sight.

“There’s a reason we’re not winning these wars, and it’s because we go after our own guys.”

Gallagher’s trial initially was slated to begin in February, but the case has been postponed until May 28.