By Ronnie Cohen

SAN FRANCISCO (Reuters) - A California appeals court upheld a judge's ruling on Thursday prohibiting the state from executing condemned inmates until it adopts a new lethal-injection protocol, in the latest judicial move against capital punishment in the state.

California has 736 inmates on death row but has not executed anyone in seven years.

A federal judge imposed a moratorium on executions there in 2006, ruling that the most populous U.S. state's use of a lethal three-drug cocktail amounted to cruel and unusual punishment.

Since then, corrections officials have tried to fix deficiencies in the injection procedure, but a state trial court last year imposed its own separate moratorium on executions after deeming the process "a substantial failure."

Thursday's California 1st Appellate District ruling came in a challenge by condemned murderer Mitchell Sims, who sued in 2010 arguing that one of three drugs to be used for executions was unnecessary and would cause excruciating pain.

Sims' attorneys also alleged the state failed to follow procedures in formulating its latest combination of drugs to be used in the lethal cocktail.

Superior Court Judge Faye D'Opal of Marin County, the site of San Quentin State Prison's death row, last year ordered a moratorium on killing inmates by lethal injection until the California Department of Corrections and Rehabilitation (CDCR) enacted new regulations in compliance with state rules.

A three-judge appeals court panel upheld D'Opal's decision.

State corrections department spokesman Jeffrey Callison said his agency had received the ruling and was reviewing it. He declined further comment.

The cocktail of drugs used in state executions contains the anesthetic sodium pentothal, muscle paralyzer pancuronium bromide and heart-stopper potassium chloride.

State officials now must decide whether to revise the rules regarding lethal injections or appeal Thursday's ruling to the California Supreme Court.

D'Opal found that the state failed to sufficiently explore alternatives to the three-drug combination and failed to explain why a single drug would not be as effective.

Clarence Ray Allen was the last inmate to be executed in California in January 2006.

(Editing by Alex Dobuzinskis, John Stonestreet)