A US judge ruled Monday that accused movie theater shooter James Holmes could plead not guilty by insanity, but said he would not yet formally accept the change of plea.

Judge Carlos Samour set a new hearing for May 31 for Holmes, accused of killing 12 people in a Colorado cinema last year, after which he will decide to accept or reject the insanity plea.

The trial judge had entered a straight "not guilty" plea on Holmes' behalf in March. At that time, his lawyers said they were not yet ready to enter a plea for Holmes, also accused of injuring another 70 people in the July 20 incident.

The massacre took place at a midnight screening of the Batman movie "The Dark Knight Rises" in the Colorado town of Aurora, outside Denver, reviving America's long-running debate about gun control.

Witnesses said Holmes threw smoke bomb-type devices before opening fire in the theater with weapons including an AR-15 military-style rifle, a 12-gauge shotgun and a .40-caliber pistol.

Holmes' court-appointed attorney Daniel King said Monday he was willing to enter an insanity plea, saying that the plea could not be entered in March because a mental evaluation had not been completed at that time.

"We now have a diagnosis... We have an opinion by professionals as to his condition," King said, adding: "Mr. Holmes' mental illness has not changed" in the 62 days since his arraignment.

Judge Samour said he will advise Holmes about what a change of plea entails at the May 31 hearing. Once that is done, Samour will either accept or reject the insanity plea.

Before the advisement hearing, Samour intends to rule on several defense motions, including a challenge to the Colorado death penalty statute.

Holmes' attorneys also want to know if any statements he makes during psychiatric evaluations can be used against him in a death penalty sentencing phase, in the event his insanity plea is rejected.

Prosecutors are pursuing the death penalty in the case, in which Holmes faces 166 counts of capital murder and attempted murder.

When Holmes first appeared in court last year, he had bright orange hair and looked befuddled. He has since let his hair color grown out and now has curly brown hair and a beard.