RICHMOND — Virginia’s Republican-controlled state Senate voted Thursday to ban the death penalty for criminal defendants with severe mental illness, despite warnings from one senator that it would allow “monsters” to escape the ultimate punishment.

Four GOP senators sided with the chamber’s 19 Democrats to pass the bill on a 23-to-17 vote, which came after sometimes emotional debate on the floor.

“I ask my colleagues to think about our responsibility for how we administer justice,” said Sen. Barbara A. Favola (D-Arlington), who sponsored the bill.

She proposed similar legislation last year, but it died in a Senate committee, as did a companion bill in the House. Her bill now heads to the House, where no companion has been filed this year.

During the debate, Sen. A. Bentin Chafin Jr. (R-Russell) rose to say the measure would protect “these monsters who move through the dark and move through the day, and they slaughter innocent people.”

Senate Majority Leader Thomas K. Norment Jr. (R-James City) voted against the bill, noting that he had represented defendants in capital cases as a court-appointed attorney.

He said the legal system already has “a number of safeguards” to protect someone with serious mental illness from the death penalty, starting from the defendant’s very first moment before a judge, who asks if the accused understands the charges. Norment said more opportunities come during the trial, when a prosecutor must prove the defendant had criminal intent, and during the sentencing phase, when the jury considers mitigating factors.

Senate Minority Leader Richard L. Saslaw (D-Fairfax) advocated for Favola’s bill by touting his record as a longtime death penalty supporter.

“I’ve been a pretty strong proponent of capital punishment,” noting as an aside that he was pleased to see it imposed on Oklahoma City bomber Timothy McVeigh. “If anyone ever deserved the death penalty, it was him.”

But when it comes to someone who is severely mentally ill, Saslaw said, “probably we ought to think twice.”

Under Favola’s bill, “severe mental illness” is defined as: “active psychotic symptoms that substantially impair a person’s capacity to (i) appreciate the nature, consequences, or wrongfulness of the person’s conduct; (ii) exercise rational judgment in relation to the person’s conduct; or (iii) conform the person’s conduct to the requirements of the law. ‘Severe mental illness’ does not include a disorder manifested primarily by repeated criminal conduct or attributable to the acute effects of voluntary use of alcohol or any drug.”

It would be up to a jury — unless a case is tried without one — to decide whether the defendant met that definition at the time of the offense. If so, the defendant would be sentenced to life, without the possibility of parole.

Sen. Scott A. Surovell (D-Fairfax), a supporter of the legislation, said during the debate that between 5 percent and 20 percent of death row inmates nationally meet the definition of severely mentally ill.

Two men are currently on death row in Virginia, which has not imposed the death sentence on anyone since 2011. The last execution was in 2017.