The man accused of killing 12 people in a Colorado movie theater shooting must undergo a second sanity evaluation by the state mental hospital because the first was "incomplete and inadequate," a judge has ruled.

Wednesday's decision means a months-long delay in James Holmes' case, which has already been in the courts for a year and a half.

The key finding of the first evaluation, whether Holmes was sane at the time of the attack, has not been made public, but prosecutors asked for the second review, claiming the first was flawed. They are seeking the death penalty, and Holmes' fate likely hangs on whether the jury decides he was insane at the time of the shooting.

Holmes is charged with killing 12 people and injuring 70 in a 2012 attack on a suburban Denver movie theater. He pleaded not guilty by reason of insanity.

In his 50-page ruling, District Judge Carlos A. Samour Jr. ruled the first review was based on insufficient data and reached some unsupported conclusions. Much of his explanation was redacted, with all or parts of 26 pages blacked out.

Holmes' first evaluation was conducted last summer. Samour said it took three months and the psychiatrist, Dr. Jeffrey Metzner, interviewed Holmes for 25 hours.

Samour said he did not question Metzner's competence but said the case was daunting, with more than 51,000 pages of documents and hundreds of DVDs and CDs. Samour also noted Metzner was given an incorrect index to some of the data.

Prosecutors wanted doctors of their choosing to conduct the new evaluation, but Samour denied that request, ordering that the second evaluation be conducted by the state hospital, but by a different doctor than last time.

Samour limited the new evaluation to one question: whether Holmes had a mental disease or defect that prevented him for telling right from wrong or that kept him from forming the intent to commit the crimes.

If jurors determine Holmes could not tell right from wrong, he would be acquitted and sent indefinitely to the state hospital. If they find he was incapable of forming intent, he could still be convicted of a crime, but not one that requires deliberation and probably not one that would carry the death penalty, said Karen Steinhauser, an attorney and former prosecutor who is not involved in the case.

But if they decide he was sane, he could be convicted of first-degree murder and sentenced either to be executed or to spend life in prison without parole.

"I believe we can assume that Dr. Metzner did find he (Holmes) did suffer from some mental disease or defect. We just don't know to what degree," Steinhauser said.

Holmes' lawyers have acknowledged he was the shooter but said in a court filing he was "in the throes of a psychotic episode."

The verdict on insanity is up to the jury, but the conclusion of the state hospital's evaluation is critical evidence in that decision.

Samour gave the state hospital until March 10 to choose another psychiatrist or psychologist to examine Holmes and set a deadline of July 11 for the new report to be submitted to him.

Holmes, now 26, is charged with planning and carrying out the assault on 421 people who were watching a midnight showing of the Batman movie "The Dark Knight Rises" in the Denver suburb of Aurora. He is charged with more than 160 counts of murder and attempted murder.

Police also say he rigged his apartment with potentially deadly bombs to distract first responders.

Holmes had been a promising student in high school and college, and in 2011 he enrolled in a Ph.D. program in neuroscience at the University of Colorado, Denver. But he quit the program a few weeks before the shootings. Prosecutors say he had failed a key test.


Follow Dan Elliott at http://twitter.com/DanElliottAP .