(CNN) -- A federal judge in California ruled Wednesday that the state's death penalty is unconstitutional.
Judge Cormac J. Carney of the U.S. District Court for the Central District of California 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."
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.
Carney wrote that the system is one "in which arbitrary factors, rather than legitimate ones like the nature of the crime or the date of the death sentence, determine whether an individual will actually be executed."
The 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.
CNN called the office of California Attorney General Kamala Harris for comment but didn't get an immediate response.
VIDEO: Will California be the next state to abolish capital punishment?
A judge struck down California's death penalty law Wednesday, arguing that it's costly and actual executions are random.
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.