By Keith Coffman

DENVER (Reuters) - A Colorado judge rejected challenges on Wednesday to the state's insanity defense statute and death penalty law by accused movie theater spree gunman James Holmes, resolving a key legal hurdle in the sensational case.

Lawyers for Holmes, accused of killing 12 moviegoers and wounding dozens more in a rampage last July, had argued that the state's insanity law was unconstitutional because it forces their client to cooperate with court-appointed psychiatrists.

They also contended that compelling the 25-year-old former neuroscience graduate student to reveal information to mental health experts that could be used against him at trial violates his constitutional right against self-incrimination. But Arapahoe County District Judge Carlos Samour disagreed.

"The provisions in the insanity statutes and the death penalty statute challenged by the defendant are constitutional," Samour wrote in a 51-page ruling, denying the defense's motions in their entirety.

The defense arguments were the latest legal wrangling surrounding last year's mass shooting in suburban Denver during a midnight screening of the Batman film "The Dark Knight Rises."

Holmes, who is charged with multiple counts of first-degree murder and attempted murder, is scheduled to stand trial in February. Prosecutors have said they will seek the death penalty if he is convicted.

In March, then-presiding Judge William Sylvester entered a standard not guilty plea for Holmes, but allowed his attorneys to change that to not guilty by reason of insanity.

Samour, who took over the case in April, has ruled that there was "good cause" for Holmes' lawyers to change the plea.

However, Samour said he could not rule on whether he would accept it until the challenges to the insanity defense and death penalty law were resolved, so he could properly advise Holmes of the ramifications of such a plea.

Public defenders for Holmes have said in court pleadings that the former University of Colorado graduate student has been hospitalized twice since his arrest, once for "potential self-inflicted injuries."

He has grown a shaggy beard and longer hair since he was arrested outside the movie theater minutes after the shooting spree. At his first court appearance days after the shooting, he looked dazed and sleepy with his hair dyed orange and red.

Neither prosecutors nor attorneys for Holmes have publicly commented on the case due to a court-imposed gag order.

(Writing and additional reporting by Dan Whitcomb; Editing by Paul Thomasch, Cynthia Johnston, G Crosse and Lisa Shumaker)