A judge in the US state of Colorado has accepted a plea for not guilty by reason of insanity from the suspect in the Aurora theater shootings last year.
Tuesday's decision sets the stage for a lengthy mental evaluation of James Holmes, who is accused of fatally shooting 12 people and injuring 70 in a packed movie theater in Aurora, Colorado during a Batman screening in July 2012.
The insanity plea is widely seen as Holmes' best chance of avoiding the death penalty, and possibly his only chance, given the weight of the evidence against him.
"The state law says that he has to cooperate now with state psychiatrists, but his defence team says that basically violates his right to not incriminate himself," said Al Jazeera's Patty Culhane, reporting from Washington.
"The trial judge said that those claims are unfounded, that the case can move forward, but his legal team now has the ability to challenge this part of the law all the way to the state supreme court or even the US supreme court, which could actually extend this case for years," she added.
The evaluation, however, could take months. Holmes is charged with multiple counts of murder and attempted murder. Prosecutors are seeking the death penalty.
Holmes' lawyers repeatedly have said he is mentally ill, but they delayed the insanity plea while arguing that state laws were unconstitutional.
The laws state that if Holmes does not cooperate with doctors conducting a mandatory mental evaluation, he would lose the right to call expert witnesses to testify about his sanity during the penalty phase of his trial.
His lawyers also contended the law does not define cooperation.
Judge Carlos Samour Jr. rejected those arguments last week and said the laws are constitutional.
The next step is an evaluation of Holmes by state doctors to determine whether he was insane at the time of the shootings. That could take months.
Colorado law defines insanity as the inability to distinguish right from wrong caused by a diseased or defective mind.
If jurors find Holmes not guilty by reason of insanity, he would be committed indefinitely to the state mental hospital. He could eventually be released if doctors find his sanity has been restored, but that is considered unlikely.