(CNN) -- A federal judge in California ruled Wednesday that the state's death penalty is unconstitutional.
In his decision, Santa Ana-based Judge Cormac J. Carney vacated the 1995 death sentence of Ernest D. Jones.
He wrote: "Allowing this system to continue to threaten Mr. Jones with the slight possibility of death, almost a generation after he was first sentenced, violates the Eighth Amendment's prohibition against cruel and unusual punishment. "
Carney called the administration of the state's death penalty system "dysfunctional."
"In California, the execution of a death sentence is so infrequent, and the delays preceding it so extraordinary, that the death penalty is deprived of any deterrent or retributive effect it might once have had," he wrote. "Such an outcome is antithetical to any civilized notion of just punishment."
Since 1978, more than 900 people in the state have been sentenced to death row, where inmates spend 23 hours alone in their cells. Of those people only 13 have been executed; 94 have died of other causes. Carney said about 40% have been on death row longer than 19 years.
California put a moratorium on the death penalty in 2006 and hasn't executed anyone since. There are 748 people on death row.
California's most recent execution was on January 17, 2006, according to the website for the state's Department of Corrections & Rehabilitation.
Clarence Ray Allen, 76, spent 23 years and one month on death row before dying from a lethal injection. He was convicted of orchestrating a triple murder from prison in 1982.
Michael Laurence, executive director of the Habeas Corpus Resource Center and Jones's lead attorney, said he was glad that a federal judge reaffirmed what a state commission found in 2008.
"There is no rational explanation, much less any moral or societal justification, for which people are ultimately executed," Laurence said in a written statement. "The execution of Mr. Jones, and the others like him whose meritorious legal claims have gone unheard for decades, serves no valid state interest."
The executive director of Death Penalty Focus said the law in California needs to be changed.
"Justice requires that we end this charade once and for all," said Matt Cherry. "It's time to replace California's broken death penalty with life in prison without the possibility of parole. That's the best way to ensure that convicted killers remain behind bars until they die, without wasting tens of millions of tax dollars every year on needless appeals."
Jones's case is expected to be appealed by prosecutors to the U.S. Court of Appeals for the Ninth Circuit, said CNN legal analyst Mark Geragos.
Nick Pacilio, a spokesman for state Attorney General Kamala Harris, said her office was reviewing the decision.
Jones was tried and received his death sentence at a time when the attention of the world was focused on another case unfolding on the same floor of Los Angeles downtown courthouse -- the O.J. Simpson murder trial. Simpson, who had assembled a legal "dream team," was acquitted; Jones was represented by a public defender.
Jones was convicted and sentenced to death for raping and killing his girlfriend's mother, Julia Miller, a 50-year-old defense industry accountant.
During the trial, Jones was portrayed as the product of a broken home with alcoholic parents. An aunt described his childhood as "a living hell." He grew up in poverty, and his parents used drugs in front of the children and battled violently. His mother beat him and his siblings. He developed a drug habit of his own, which included marijuana and cocaine.
He told witnesses that he had heard voices and experienced flashbacks during the year before the slaying. He said the victim confronted him over his treatment of her daughter and pointed a rifle at him, which caused him to flash back to violent incidents in his childhood, according to the state Supreme Court opinion affirming his conviction.
The court record indicates that Jones had spent several years in prison for raping the mother of a previous girlfriend.
The California Supreme Court in 2003 upheld the conviction of Jones on first-degree murder and rape charges.