RICHMOND — Virginia's Senate voted Wednesday in favor of abolishing the death penalty as an identical bill advanced in the House, putting the onetime capital of the Confederacy on track to become the first Southern state to eliminate capital punishment.

All 21 Senate Democrats voted for the ban after nearly two hours of sometimes emotional debate, with 17 Republicans opposed and one abstaining. Sen. Scott A. Surovell (D-Fairfax), who sponsored the abolition bill, said an estimated 1 in 10 people sentenced to death nationally had been wrongly convicted.

“I cannot think of anything that’s more awful, unspeakable and wrong for a government to do than to use its power to execute somebody who didn’t commit the crime they’re accused of,” said Surovell, who also noted that the punishment has been disproportionately applied to racial minorities and people with diminished mental capacity nationally.

An identical bill cleared a House committee earlier in the day and could come up for a floor vote in the lower chamber by Friday, the midpoint of the General Assembly session and the deadline for bills to clear one chamber and “cross over” to the other.

With Gov. Ralph Northam (D) backing abolition efforts, capital punishment appears to be on the way out in the state that has practiced it longer than any other.

Since 1608, when Jamestown colonists executed a spy for Spain, Virginia has put more people to death than anywhere else in what’s now the United States. Since 1976, when the U.S. Supreme Court reinstated the death penalty, Virginia has executed 113 people — more than every other state but Texas.

Some Republicans, who lost the majority in both chambers in 2019 amid a wave of opposition to President Donald Trump, contended some crimes are so heinous that the ultimate punishment is warranted. Sen. Mark D. Obenshain (R-Rockingham) invoked the name of Ricky Gray, who was convicted of torturing and killing a Richmond family in 2006 during a burglary of their home. Gray was executed in 2017, one of two Virginia inmates put to death that year. There are two people currently on death row in the commonwealth.

“These are savage crimes,” Obenshain said. “These are the worst of the worst. . . . I believe in the rare application of capital punishment.”

Obenshain acknowledged that the death penalty had once been unfairly used to target minorities, but he said that was a problem of the past.

“I do not believe this bill is an appropriate response to the misapplication of capital punishment in decades and centuries past,” he said. “I believe in our American system of justice. I believe we are better than we have ever been.”

Three Senate Republicans said they would have supported the measure if it had established a mandatory minimum sentence of life in prison without the possibility of parole for anyone convicted of what is currently a capital offense.

The House bill cleared that chamber’s Courts of Justice Committee earlier Wednesday. The House and Senate bills would establish that someone convicted of aggravated murder could be sentenced to life without parole, time off for good behavior or conditional release. But the sentences would not be mandatory, meaning a judge would be free to impose a lighter punishment.

State Sen. William M. Stanley Jr. (R-Franklin), a longtime death penalty foe, signed on as co-sponsor of Surovell’s bill but abstained Wednesday. The day before, he had unsuccessfully tried to amend it to mandate life without parole for capital offenses.

The Courts of Justice committee advanced the House bill on a bipartisan 15-to-6-to-1 vote. Two Republicans joined all 13 of the committee’s Democrats in backing the measure, which was sponsored by Del. Michael P. Mullin (D-Newport News), a prosecutor for the city of Hampton. One Republican abstained.

There was little debate.

“This is obviously a very significant step, it involves our most serious offenders,” Del. Rob Bell (R-Albemarle) said before voting against the measure and promising to discuss it more fully on the House floor. No other Republicans spoke.

But several Democrats praised the vote as momentous.

“This is absolutely not a political issue or a political calculation,” said Del. Marcus B. Simon (D-Fairfax). “For many of us, this is a matter of conscience. I’ve always believed it’s not the role of the state to take people’s lives.”