Murder suspects with a severe mental illness at the time the crime was committed could be exempted from the death penalty, under a bill before Ohio lawmakers that would still allow offenders to be convicted and sentenced to prison including life without parole.

The proposed legislation would allow a hearing before trial on an offender’s mental condition and permit a judge to rule out the death penalty if severe mental illness is proven. If the judge keeps the death penalty on the table, the issue could be raised again during the trial.

Current death row inmates could also challenge their sentences on the same grounds. The bill does not affect defendants who plead not guilty by reason of insanity.

Prosecutors say the legislation opens the door to challenges from practically every inmate on Ohio’s death row. Bill supporters estimate only about 15% of those prisoners might have legitimate claims, or about 20 of the 140 inmates currently sentenced to die in Ohio.

Illnesses covered by the bill include schizophrenia, bipolar disorder and major depressive disorder. Ohio would be the second state with such a law if enacted after Connecticut, which has since abolished the death penalty. Indiana, Kentucky, North Carolina and Tennessee have considered similar measures.

“Ohioans may be split on the issue of legality concerning the death penalty, but most people believe that executing an individual found to be suffering from a serious mental illness at the time of the crime is neither fair nor just,” bill co-sponsor Senator Bill Seitz, a Cincinnati Republican, told lawmakers last week.

The bill was one of several recommendations by an Ohio supreme court taskforce that spent more than two years studying changes to the state’s capital punishment law.

Updated attitudes that now prohibit executing juveniles and people with mental disabilities should be expanded to mentally ill people, Evelyn Lundberg Stratton, a former Ohio supreme court justice, told the senate criminal justice committee on Wednesday.

Prosecutors say there is plenty of room under current law to deal with inmates with mental illness claims. They say updating the law could lead to challenges based on mood swings, anxiety and hopelessness.

“This bill expands mental illness considerations far beyond what is necessary and will bar consideration of the death penalty in inappropriate circumstances,” John Murphy, lobbyist for the Ohio Association of Prosecuting Attorneys, said in an email to lawmakers earlier this year.

Debate over mental illness and Ohio death row inmates is at least as old as the state’s 1981 law that reinstituted capital punishment. Numerous questions were raised about the mental health of the first inmate executed under that law, Wilford Berry, put to death in 1999 for killing a Cleveland baker.

In 2003, the Ohio supreme court split 4-3 in favor of executing Stephen Vrabel, who killed his girlfriend and their three-year-old daughter and stuffed their bodies in a refrigerator and freezer. The then chief justice Thomas Moyer was among those who felt Vrabel should not be executed because of his mental illness.