A referendum in California to speed up the appeals process for the state’s death row inmates has narrowly passed, while a separate measure to abolish the state’s death penalty has failed.

The Associated Press called both races Wednesday morning.

Proposition 66, which speeds up the appeals process, won with 50.9 percent of the vote. The competing Proposition 62, which would have abolished California’s death penalty, drew 46.1 percent.

The state had previously attempted to address its sprawling, costly system in 2012 when it narrowly missed abolishing the death penalty.

David Paul Morris/Bloomberg via Getty Images Inmates stand outside at San Quentin State Prison in San Quentin, California, Aug. 16, 2016. San Quentin is home to the state's only death row.

California’s 750 death row prisoners represent a quarter of the nation’s death penalty population. The state has only executed 13 prisoners since it resumed executions in 1978, and none have been carried out since 2006. More prisoners sentenced to death have died from illness, suicide or other causes than from executions, according to state data. But the state has continued to sentence people to death nevertheless.

Last year, California ran out of room on death row, which prompted Gov. Jerry Brown (D) to ask lawmakers for $3.2 million to open additional cells in San Quentin, which houses the state’s death row and execution chamber.

The costs of California’s death penalty system have climbed with the growing death row population. Since the 1970s, maintaining the death penalty has cost the state an estimated $4 billion, or roughly $308 million per execution.

Californians on both sides of the death penalty debate agree the system needs to change.

Supporters of the abolition effort have argued the system is too broken to fix and too costly to keep. Eliminating the death penalty would not only save an estimated $150 million a year, they say, but would ensure the state does not execute any innocent people.

Supporters of the successful Proposition 66, meanwhile, say California should “mend, not end,” the death penalty.

Prop 66 expands which courts and attorneys can hear appeals in death penalty cases, thus expediting the process. Trial courts, rather than appeals courts, will hear initial challenges to death penalty convictions, and lawyers will be required to defend capital cases to which they were assigned. Previously, lawyers who represented death penalty clients during the appeals process had to have relevant experience.

Prop 62 supporters said the competing measure was poorly written and failed to address systemic problems like racial bias or the challenges of carrying out executions constitutionally.

Under Prop 62, inmates would have been required to work, with between 20 percent and 60 percent of their earnings garnished to pay restitution to their victims’ families.

While the measure enjoyed broad support from a coalition of current and former officials (many of them Democrats), human rights groups and notables like former President Jimmy Carter, one surprising group opposed the measure — death row inmates themselves.

Without the death penalty, prisoners are likely to lose resources to appeal and, in some cases, investigate their convictions, thus reducing their chances of having a conviction overturned or a sentence reduced.

“I led the campaign to bring the death penalty back to California in 1978. It was a costly mistake,” said Ron Briggs, who spearheaded the effort to create California’s death penalty system, in a statement supporting Prop 62. “Now I know we just hurt the victims’ families we were trying to help and wasted taxpayer dollars. The death penalty cannot be fixed. We need to replace it, lock up murderers for good, make them work, and move on.”