CENTENNIAL, Colo. — A judge accepted James Holmes' long-awaited plea of not guilty by reason of insanity Tuesday and ordered him to undergo a mental evaluation – an examination that could be a decisive factor in whether the Colorado theater shooting suspect is convicted and sentenced to die.

The judge also granted prosecutors access to a hotly contested notebook that Holmes sent to a psychiatrist shortly before the July 20 rampage, which left 12 people dead and 70 injured in a bloody, bullet-riddled movie theater in suburban Denver.

Taken together, the three developments marked a major step forward in the 10-month-old case, which at times has inched along through thickets of legal arguments or veered off on tangents.

Holmes faces more than 160 counts of murder and attempted murder, and prosecutors are seeking the death penalty.

He will now be examined by the Colorado Mental Health Institute in Pueblo, but it's not certain when the evaluation will begin or how long it will take. Hospital officials have said that before they meet with Holmes, they want to review evidence in the case, which prosecutors said totals nearly 40,000 pages.

Judge Carlos Samour Jr. set a tentative date of Aug. 2 for the exam to be complete but said he would push that back if hospital officials request more time. Samour indicated he still hopes to begin Holmes' trial in February.

Holmes, 25, shuffled into court with his wrists and ankles shackled, wearing a long, bushy beard and dark, curly hair that was slicked back.

Samour read Holmes a five-page list of consequences of the insanity plea and asked if he had any questions.

"No," Holmes answered in a clear, firm voice. It was only the second time since his arrest that he has spoken in court, other than occasional whispered exchanges with his attorneys.

The findings of the mental evaluation will become evidence in Homes' trial, but they are not the final word on whether he was legally insane at the time of the shootings. The jurors will determine that.

If their verdict is not guilty by reason of insanity, Holmes would be committed to the Mental Health Institute indefinitely. He could theoretically be released one day if doctors determine his sanity has been restored, but that is considered unlikely.

If their verdict is guilty, jurors would then decide whether Holmes will be executed or spend the rest of his life in prison without the possibility of parole.

Colorado law defines insanity as the inability to distinguish right from wrong caused by a diseased or defective mind.

Marcus Weaver, who was wounded and lost his friend Rebecca Wingo in the shooting, doesn't believe Holmes is insane but is grateful the case is moving forward.

"As we've seen evidence and seen the case unfold, it's become more evident that Mr. Holmes did what he did, and it had nothing to do with his mental state," he said.

The insanity plea is widely seen as Holmes' best chance of avoiding execution, but his lawyers delayed it for weeks, saying Colorado's laws on the insanity plea and the death penalty could work in combination to violate his constitutional rights.

The judge overruled their objections last week, but on Tuesday he conceded one point: Neither Holmes nor his lawyers had to sign a statement or say in court that they understood the five-page list of consequences of the insanity plea.

Samour originally planned to require Holmes and the defense to acknowledge they understood those consequences before he accepted the plea. But Samour said Tuesday he had determined that wasn't required by law.

Holmes needed Samour's approval to enter the insanity plea because a judge had entered a standard not guilty plea on Holmes' behalf in March.

Prosecutors first sought access to the notebook when its existence was made public days after the shooting. Holmes had mailed it to Dr. Lynn Fenton, a University of Colorado, Denver psychiatrist who had treated Holmes. Holmes had been a graduate student in neuroscience at the university.

The notebook's contents have never been officially made public, but media reports have said it contains drawings depicting violence.

The defense argued the notebook was protected by doctor-patient privilege. But Samour ruled Tuesday that under Colorado law, Holmes waived that privilege when he entered the insanity plea.

Prosecutors said Tuesday that in addition to reviewing the contents of the notebook, they would ask police to do unspecified "additional processing" of it.

Court officials also released nearly 100 pretrial motions Tuesday, most of them from the defense.

One signaled that Holmes will seek a change of venue because of pretrial publicity. Others challenged the admissibility of ballistics, handwriting and mountains of other evidence and demanded that prosecutors hand over as many as 2,000 pieces of physical evidence.

Holmes' lawyers appear to be trying to humanize their client, who made his first court appearances with a mop of dyed orange hair. They filed motions asking that he be allowed to appear before jurors in civilian clothes, instead of a jail uniform, and without shackles. They also asked that authorities ratchet back courthouse security, including armed guards on the roof.

Defense lawyers want Holmes' parents to be allowed to witness the entire trial in support of their son and not be sequestered like other possible witnesses.

___

Associated Press writer Nicholas Riccardi contributed to this report.

___

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

Also on HuffPost:

Loading Slideshow...
  • Rebecca Ann Wingo

    This undated photo provided by the family shows Rebecca Ann Wingo. Wingo, 32, was one of the victims killed in the Friday, July 20, 2012 movie theater shooting in Aurora, Colo. (AP Photo)

  • The undated photo provided by the family shows Alex Teves. Teves, 24, was one of the victims killed in the Friday, July 20, 2012 movie theater shooting in Aurora, Colo. (AP Photo/Teves Family)

  • Jessica Ghawi

    This undated photo provided by the family shows Jessica Ghawi. Ghawi is one of the 12 people killed when a gunman barged into a crowded theater, set off gas canisters and opened fire as spectators dove for cover and tried to flee, Friday, July 20, 2012, in Aurora, Colo. Dozens of others were injured, including 11 in critical condition. (AP Photo/Courtesy of the family)

  • This undated photo provided by the Larimer family shows John Larimer. Relatives have identified Larimer, a U.S. Navy sailor, as one of the victims killed by a gunman at a showing of the new Batman movie, early Friday, July 20, 2012, in Aurora, Colo. (AP Photo/Larimer family)

  • This undated photo provided by Robert Sullivan shows Veronica Moser-Sullivan, the youngest person slain in the July 20 attack that left 12 dead and dozens wounded during the Aurora theater shootings. Robert Sullivan, Veronica's grandfather, wants a thief to return pictures of the child that were stolen from his home in a burglary this week. He said Wednesday, Oct. 3, 2012 that four cameras were stolen, including one that had a memory card with more than 40 photos of Veronica at a school celebration. Other images show her at a playground. (AP Photo/Robert Sullivan)

  • This undated photo provided by the family shows Jonathan T. Blunk, 26, of Aurora, Colo. with his two children. Blunk was one of the victims in the Friday, July 20, 2012 Aurora, Colo. movie theater shooting. (AP Photo)

  • This undated photo provided by the U.S. Air Force shows Jesse Childress. The 29-year-old, from Thornton, Colo., was one of the victims in the Friday, July 20, 2012 Aurora, Colo. movie theater shooting. Childress was an Air Force cyber-systems operator based at Buckley Air Force Base in Aurora. (AP Photo/U.S. Air Force)

  • Alexander J. Boik

    This undated image provided by the family shows Alexander J. Boik, known as AJ. Boik was one of the victims in the Friday, July 20, 2012 Aurora, Colo. movie theater shooting. (AP Photo)

  • Matt McQuinn, Samantha Yowler

    This undated photo provided by the family shows Matt McQuinn, left, and Samantha Yowler. McQuinn was killed and Yowler was wounded in the Friday, July 20, 2012 Aurora, Colo., movie theater shooting. (AP Photo)

  • This photo provided by the family shows Micayla Medek. Medek, 23, is one of the 12 people killed when a gunman barged into a crowded theater, set off gas canisters and opened fire as spectators dove for cover and tried to flee, Friday, July 20, 2012, in Aurora, Colo. Dozens of others were injured, including 11 in critical condition. (AP Photo/Courtesy of the family)

  • A tribute to movie theater shooting victim AJ Boik, is shown along with his photo, on a message table Saturday, July 21, 2012, at a vigil at Gateway High School in Aurora, Colo., Boik, was a student at the school and was killed along with 11 others when a gunman opened fire in a movie theater. (AP Photo/Ted S. Warren)

  • This photo provided by The Cowden Family shows shooting victim Gordon W. Cowden. Twelve people were killed and dozens were injured in the attack early Friday, July 20, 2012 at the packed theater during a showing of the Batman movie, "The Dark Knight Rises." in Aurora, Colo. Police have identified the suspected shooter as James Holmes, 24. (AP Photo/The Cowden Family)

  • Jonathan Blunk, Jesse Childress, Gordon Cowden, Jessica Ghawi, John Larimer, Micayla Medek, Alex Sullivan

    This combination of photos provided by their families shows seven of the 12 victims in the Friday, July 20, 2012 Aurora, Colo. movie theater shooting. Top row from left are Jonathan Blunk, Jesse Childress, Gordon Cowden, Jessica Ghawi, and bottom row from left, John Larimer, Micayla Medek, Alex Sullivan. (AP Photo)

  • This Sept. 20, 2011 photo provided by The Sullivan Family, shows shooting victim Alex Sullivan. Twelve people were killed and dozens were injured in the attack early Friday, July 20, 2012 at the packed theater during a showing of the Batman movie, "The Dark Knight Rises." in Aurora, Colo. Police have identified the suspected shooter as James Holmes, 24. (AP Photo/The Sullivan Family)

  • The Bass Pro Shops store in Denver, Colo. is shown, Saturday, July 21, 2012. The is store is where the gunman in Friday's movie theater shooting in Aurora, Colo., allegedly purchased two of his weapons. (AP Photo/Ted S. Warren)

  • The Gander Mountain store in Aurora, Colo. is shown, Sunday, July 22, 2012. The is store is where the gunman in Friday's movie theater shooting allegedly purchased one of his weapons. (AP Photo/Ted S. Warren)

  • Tom Sullivan , holds a photograph of his son, Alex Sullivan, as he pleads with the media to help him find his son, outside Gateway High School on Friday, July 20, 2012 in Aurora, Colo. Alex Sullivan, was celebrating his 27th birthday by attending midnight premiere of the Batman movie Friday night. A gunman wearing a gas mask set off an unknown gas and fired into the crowded movie theater killing 12 people and injuring at least 50 others, authorities said. (Photo credit: AP Photo/Barry Gutierrez)

  • A woman cries outside Gateway High School where witness were brought for questioning after a gunman opened fire at a midnight premiere of The Dark Knight Rises Batman movie Friday, July 20, 2012 in Aurora, Colo. A gunman wearing a gas mask set off an unknown gas and fired into the crowded movie theater killing 12 people and injuring at least 50 others, authorities said. (Photo credit: AP Photo/Barry Gutierrez)

  • Tom Sullivan, center, embraces family members outside Gateway High School where he has been searching franticly for his son Alex Sullivan who celebrated his 27th birthday by going to see "The Dark Knight Rises," movie where a gunman opened fire Friday, July 20, 2012, in Aurora, Colo. (Photo credit: AP Photo/Barry Gutierrez)

  • Eyewitness Chandler Brannon, 25, sits outside Gateway High School where witnesses were brought for questioning after a shooting at a movie theater showing the Batman movie "The Dark Knight Rises," Friday, July 20, 2012 in Aurora. A gunman wearing a gas mask set off an unknown gas and fired into the crowded movie theater killing 12 people and injuring at least 50 others, authorities said. (Photo credit: AP Photo/Barry Gutierrez)

  • A small group prays outside Gateway High School where witness were brought for questioning Friday, July 20, 2012 in Aurora, Colo. A gunman wearing a gas mask set off an unknown gas and fired into the crowded movie theater killing 12 people and injuring at least 50 others, authorities said. (Photo credit: AP Photo/Barry Gutierrez)

  • Family and friends wait outside Gateway High School where witnesses were brought for questioning after a shooting at a movie theater showing the Batman movie "The Dark Knight Rises," Friday, July 20, 2012 in Aurora, Colo. A gunman wearing a gas mask set off an unknown gas and fired into the crowded movie theater killing 12 people and injuring at least 50 others, authorities said. (Photo credit: AP Photo/Barry Gutierrez)

  • Eyewitness Jacob Stevens, 18, hugs his mother Tammi Stevens after being interview by police outside Gateway High School where witnesses were brought for questioning Friday, July 20, 2012 in Aurora, Colo. A gunman wearing a gas mask set off an unknown gas and fired into the crowded movie theater killing 12 people and injuring at least 50 others, authorities said. (Photo credit: AP Photo/Barry Gutierrez)

  • Eyewitness Isaiah Bow hugs his mother Shamecca Davis after being questioned by police outside Gateway High School where witnesses were brought in, Friday, July 20, 2012 in Aurora, Colo. After leaving the theater Bow went back in to find his girlfriend. "I didn't want to leave her in there. But she's ok now," Bow said. A gunman wearing a gas mask set off an unknown gas and fired into the crowded movie theater killing 12 people and injuring at least 50 others, authorities said. (Photo credit: AP Photo/Barry Gutierrez)

  • Emma Goos, 19, hugs her mother, Judy Goos, outside Gateway High School where witnesses were brought for questioning Friday, July 20, 2012, in Aurora, Colo. Emma was in the third row of the theater of the new Batman movie when the shooter entered. She helped apply pressure to a man's head who was injured. (Photo credit: AP Photo/Barry Gutierrez)

  • Police cars in front of the Century 16 theater in Aurora, Colorado where a gunman opened fire during the opening of the new Batman movie "The Dark Knight Rises" killing at least 15 people and wounding 50 others on the morning of July 20, 2012. The shooting suspect in custody after at least 12 people were shot dead and around 50 were wounded at a movie screening in the United States has been identified as 24-year-old James Holmes, US media said Friday. Television networks cited the FBI as saying that Holmes, from the town of Aurora, Colorado, scene of the midnight shooting at a screening of the Batman movie "The Dark Knight Rises," did not appear to have any known terrorism connections. (Photo credit: AFP PHOTO/JONATHAN CASTNER JONATHAN CASTNER/AFP/GettyImages)

  • Police tape cordons off the parking area around the Century 16 movie theater in Aurora, Colorado, July 20, 2012 where a gunman opened fire during the showing of the new Batman movie. At least 12 people were killed and around 50 wounded in the cinema shooting. (Photo credit: AFP PHOTO JONATHAN CASTNERJONATHAN CASTNER/AFP/GettyImages)

  • Police cars in front of the Century 16 theater in Aurora, Colorado where a gunman opened fire during the opening of the new Batman movie "The Dark Knight Rises" killing at least 15 people and wounding 50 others on the morning of July 20, 2012. The shooting suspect in custody after at least 12 people were shot dead and around 40 were wounded at a movie screening in the United States has been identified as 24-year-old James Holmes, US media said Friday. Television networks cited the FBI as saying that Holmes, from the town of Aurora, Colorado, scene of the midnight shooting at a screening of the Batman movie "The Dark Knight Rises," did not appear to have any known terrorism connections. (Photo credit: AFP PHOTO/JONATHAN CASTNERJONATHAN CASTNER/AFP/GettyImages)

  • Police cars in front of the Century 16 theater in Aurora, Colorado where a gunman opened fire during the opening of the new Batman movie "The Dark Knight Rises" killing at least 15 people and wounding 50 others on the morning of July 20, 2012. The shooting suspect in custody after at least 12 people were shot dead and around 50 were wounded at a movie screening in the United States has been identified as 24-year-old James Holmes, US media said Friday. Television networks cited the FBI as saying that Holmes, from the town of Aurora, Colorado, scene of the midnight shooting at a screening of the Batman movie "The Dark Knight Rises," did not appear to have any known terrorism connections. (Photo credit: AFP PHOTO/JONATHAN CASTNERJONATHAN CASTNER/AFP/GettyImages)

  • Police cars are seen in the parking area around the Century 16 movie theater in Aurora, Colorado, July 20, 2012 where a gunman opened fire during the showing of the new Batman movie. At least 12 people were killed and around 50 wounded in the cinema shooting. (Photo credit: AFP PHOTO JONATHAN CASTNERJONATHAN CASTNER/AFP/GettyImages)

  • Police use a video camera to look inside an apartment where the suspect in a shooting at a movie theatre lived in Aurora, Colo., Friday, July 20, 2012. As many as 12 people were killed and 50 injured at a shooting at the Century 16 movie theatre early Friday during the showing of the latest Batman movie. (Photo credit: AP Photo/Ed Andrieski)

  • Police break out a window of an apartment where the suspect in a shooting at a movie theatre lived in Aurora, Colo., Friday, July 20, 2012. As many as 12 people were killed and 50 injured at a shooting at the Century 16 movie theatre early Friday during the showing of the latest Batman movie. (Photo credit: AP Photo/Ed Andrieski)

  • Shamecca Davis hugs her son Isaiah Bow, who was an eye witness to the shooting, outside Gateway High School where witness were brought for questioning Friday, July 20, 2012 in Denver. After leaving the theater Bow went back in to find his girlfriend. " I didn't want to leave her in there. But she's ok now," Bow said. A gunman wearing a gas mask set off an unknown gas and fired into a crowded movie theater at a midnight opening of the Batman movie "The Dark Knight Rises," killing at least 12 people and injuring at least 50 others, authorities said. (Photo credit: AP Photo/Barry Gutierrez)

  • Judy Goos, second from left, hugs her daughters friend, Isaiah Bow, 20, while eye witnesses Emma Goos, 19, left, and Terrell Wallin, 20, right, gather outside Gateway High School where witness were brought for questioning Friday, July 20, 2012 in Denver. A gunman wearing a gas mask set off an unknown gas and fired into a crowded movie theater at a midnight opening of the Batman movie "The Dark Knight Rises," killing at least 12 people and injuring at least 50 others, authorities said. (Photo credit: AP Photo/Barry Gutierrez)

  • A SWAT team officer stands watch near an apartment house where the suspect in a shooting at a movie theatre lived in Aurora, Colo., Friday, July 20, 2012. As many as 14 people were killed and 50 injured at a shooting at the Century 16 movie theatre early Friday during the showing of the latest Batman movie. (Photo credit: AP Photo/Ed Andrieski)

  • Police gather near an apartment house where the suspect in a shooting at a movie theatre lived in Aurora, Colo., Friday, July 20, 2012. As many as 12 people were killed and 50 injured at a shooting at the Century 16 movie theatre early Friday during the showing of the latest Batman movie. (Photo credit: AP Photo/Ed Andrieski)

  • A SWAT team officer stands watch near an apartment house where the suspect in a shooting at a movie theatre lived in Aurora, Colo., Friday, July 20, 2012. As many as 12 people were killed and 50 injured at a shooting at the Century 16 movie theatre early Friday during the showing of the latest Batman movie. (Photo credit: AP Photo/Ed Andrieski)

  • Jacob Stevens, 18, hugs his mother Tammi Stevens after being interview by police outside Gateway High School where witness were brought for questioning after a shooting at a movie theater, Friday, July 20, 2012 in Denver. A gunman wearing a gas mask set off an unknown gas and fired into a crowded movie theater at a midnight opening of the Batman movie "The Dark Knight Rises," killing at least 12 people and injuring at least 50 others, authorities said. (Photo credit: AP Photo/Barry Gutierrez)

  • (Credit: Sky News)

  • (Credit: Sky News)

  • (Credit: Sky News)

  • (Credit: Sky News)

  • Police are pictured outside of a Century 16 movie theatre where as many as 12 people were killed and many injured at a shooting during the showing of a movie at the in Aurora, Colo., Friday, July 20, 2012. (Photo credit: AP Photo/Ed Andrieski)

  • Police are pictured outside of a Century 16 movie theatre where as many as 12 people were killed and many injured at a shooting during the showing of a movie at the in Aurora, Colo., Friday, July 20, 2012. (Photo credit: AP Photo/Ed Andrieski)

  • Aurora Police Chief Daniel Oates talks to media at Aurora Mall where as many as 12 people were killed and many injured at a shooting at the Century 16 movie theatre in Aurora, Colo., Friday, July 20, 2012. (Photo credit: AP Photo/Ed Andrieski)

  • Aurora Police Chief Daniel Oates talks to media at the Aurora Mall where as many as 14 people were killed and many injured at a shooting at the Century 16 movie theatre in Aurora, Colo., Friday, July 20, 2012. (Photo credit: AP Photo/Ed Andrieski)

  • Police are pictured outside of a Century 16 movie theatre where as many as 12 people were killed and many injured at a shooting during the showing of a movie at the in Aurora, Colo., Friday, July 20, 2012. (Photo credit: AP Photo/Ed Andrieski)

  • Police are pictured outside of a Century 16 movie theatre where as many as 12 people were killed and many injured at a shooting during the showing of a movie at the in Aurora, Colo., Friday, July 20, 2012. (Photo credit: AP Photo/Ed Andrieski)

  • People gather outside the Century 16 movie theatre in Aurora, Colo., at the scene of a mass shooting early Friday morning, July 20, 2012. Police Chief Dan Oates says 12 people are dead following the shooting at the suburban Denver movie theater. He says 50 others were injured when gunfire erupted early Friday at the Aurora theater. Oates says a gunman appeared at the front of one of the Century 16 theaters. <em>Photo Credit: Karl Gehring, <a href="http://www.huffingtonpost.com/news/exposure/" target="_hplink">Denver Post</a>. </em> / AP

  • (Photo credit: 7NewsMorning/Twitter)