A federal judge has ruled that California's death penalty system is unconstitutional.

U.S. District Judge Cormac J. Carney handed down an order Wednesday, finding that the system is arbitrary and in violation of the Constitution's 8th Amendment.

"California's death penalty system is so plagued by inordinate and unpredictable delay that the death sentence is actually carried out against only a trivial few of those sentenced to death," Carney writes. "For all practical purposes then, a sentence of death in California is a sentence of life imprisonment with the remote possibility of death -- a sentence no rational legislature or jury could ever impose."

Carney continues: "Inordinate and unpredictable delay... has resulted in a system 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. And it has resulted in a system that serves no penological purpose. Such a system is unconstitutional."

The ruling also vacated the death sentence of petitioner Ernest Dewayne Jones (whose middle name has also appeared in news reports as "Dwayne"). Jones was convicted of first-degree murder and sentenced to death in 1995.

Capital punishment was ruled unconstitutional by the state's Supreme Court in 1976, but was reinstated by the state legislature the following year. Since then, 13 inmates have been executed in California, most recently Clarence Ray Allen in 2006. An analysis by the Los Angeles Times found that the state spent $308 million on each execution.

Read the order below: