People who can prove they were affected by severe mental illness when they committed a capital crime would be exempt from the death penalty under a new Texas law introduced Tuesday.

Mental health advocates joined state Rep. Toni Rose (D) as she introduced HB 3080 and presented it as a humane and cost-saving measure that would still allow a convicted killer to be punished.

“The bill would not allow an offender to walk free,” Rose said Tuesday in a press conference. “It doesn’t prevent individuals for being held accountable for their actions.”

The Texas bill would only provide exemptions for what Rose called “severe illnesses” ― which include schizophrenia, schizoaffective disorder, bipolar disorder, obsessive disorder and depression ― and would require proof that the individual had a qualifying illness or symptoms of one at the time of the crime.

A judge would determined before trial whether a defendant’s illness merited an exemption.

(Read the text of the bill below.)

The bill would bring Texas’ death penalty into alignment with laws that bar executions for vulnerable groups like juveniles and the intellectually disabled, according to Rose and mental health advocates.

Greg Hansch, the director of public policy for the National Alliance on Mental Illness in Texas, said allowing the severely mentally ill to be executed is “a broken aspect of our criminal justice system.”

“This bill is ability for us to close a clear, costly loophole,” he said as HB 3380 was being introduced.

Pro-lifers believe we should protect the most vulnerable in our society, not kill them. Marc Hyden, Conservatives Concerned About the Death Penalty

Among the 32 states that have the death penalty, Texas is considered the most aggressive: Since capital punishment was reinstated in 1976, the state has executed 540 people ― almost five times as many people as the next highest states, Oklahoma and Virginia.

A growing number of states are considering laws that would prevent executions of people with severe mental illness. Lawmakers in at least seven other states, including Indiana, Ohio, North Carolina, South Dakota and Virginia, have introduced or announced plans to introduce such legislation.

Organizations like the American Bar Association and the American Psychological Association have also taken clear stances in support of such exemptions.

“This is something we’re seeing across the U.S. — a lot of conservative states are moving in this direction and you’re going to see more Republican support,” said Marc Hyden, the ‎national advocacy coordinator for Conservatives Concerned About the Death Penalty.

“If there’s any state that should be pushing this, it is Texas,” Hyden said. “That’s where Scott Panetti was sent to die.”

Panetti’s case has been cited by advocates of severe mental illness exemptions (including a former Tennessee attorney general) as an example of why such death penalty reforms are needed.

Panetti had been diagnosed with “early schizophrenia” following his discharge from the Navy in 1978. He was hospitalized 15 times for mental health-related issues between leaving the military and 1992. He was convicted of killing his in-laws that year, and displayed bizarre behavior while representing himself in the trial. Panetti remains on death row in Texas after a 2014 execution attempt was halted.

Even conservatives who aren’t ready to support full-on abolition of the death penalty tend to think the mental health exemption makes sense, Hyden said.

“Every single one I’ve met thinks it’s a miscarriage of justice to execute ill people,” he said. “I’m pro-life, and so our most of our supporters. Pro-lifers believe we should protect the most vulnerable in our society, not kill them. People with the severe mental illness are the most vulnerable in society.”

Texas Attorney General Ken Paxton said he had “no comment” on the bill.