Updated

The former graduate student accused in a deadly mass shooting at a Colorado movie theater had failed a key exam six weeks before the rampage, made threats and was banned from his college, prosecutors said Thursday.

University of Colorado Denver spokeswoman Jacque Montgomery later disputed that James Holmes was banned from campus but confirmed that a criminal background check was done on him before the July 20 attack.

She said a court gag order prevented her from discussing who requested the check, who performed it, and who saw the results.

Montgomery's statement was believed to be the first explicit public confirmation that a check had been done on Holmes' background before the shootings.

Montgomery did say that campus Police Chief Doug Abraham was referring to that background check when he said at a July 23 news conference that Holmes had only a minor infraction on his record.

She said Holmes' access to restricted areas on campus was canceled because he left his program in June, not because of threats.

Prosecutors made their new claims Thursday against Holmes in their effort to persuade a judge to allow them access to 100 pages of education records subpoenaed from the university, where Holmes had been a neuroscience doctoral candidate.

The university turned over the documents last week, but Holmes' lawyers moved to keep them sealed.

Chief Deputy District Attorney Karen Pearson told the judge that Holmes was stockpiling ammunition, body armor and explosives at his apartment and at the university while he was flunking out. Gaining access to the records, she argued, would establish motive by showing what Holmes hoped to accomplish at CU and the "dissatisfaction with what occurred in his life that led to this."

The judge said he would rule in time for the next hearing in the case, scheduled for Aug. 30.

Holmes is charged with killing 12 people and wounding 58 in the shooting during a midnight showing of the latest Batman movie. He has not issued a plea and remains held without bail.

The prosecutors' account presented a sharply different picture of Holmes' departure from CU from that provided by university officials in the days after the shooting.

Pearson did not elaborate on the nature of the threats during the hearing, nor did she disclose the source of the information. But she said that professors had urged Holmes to get into another profession and that his research had been deteriorating.

Prosecutors are seeking Holmes' university application, his grades, course schedules, emails concerning Holmes, and anything concerning his termination or withdrawal from the school in June.

"What's going on in the defendant's life at the time is extremely relevant to this case," Pearson said.

Defense lawyer Daniel King objected to the release of the records, calling the prosecution's request a "fishing expedition that needs to be stopped."

Holmes appeared more engaged in the hearing than previous court appearances. His walk was more deliberate when he came into the courtroom. Rather than staring blankly ahead, he looked at the judge for most of the hearing.

Before a gag order was issued, the university had said campus police had no records on Holmes.

University officials also said Holmes lost access to university buildings after his June 10 withdrawal because his student access card was shut off, not because of threats or any other safety reason.

The university also said in writing there were no documents related to the decision to bar Holmes from the campus.

Prosecutors say they need the university documents to gain access to a notebook reportedly containing violent descriptions of an attack. The notebook reportedly was in a package Holmes sent to university psychiatrist Lynne Fenton.

King has said the notebook is protected by a doctor-patient relationship. King claims that Holmes is mentally ill and had sought out Fenton for help with that illness.

Fenton is expected to testify at the Aug. 30 hearing.

Pearson said prosecutors want to establish whether Fenton was Holmes' psychiatrist at the time he sent the package to her, and if she was, whether the notebook was meant for therapy, which wouldn't be protected under the doctor-patient privilege.

Former Denver Deputy District Attorney Karen Steinhauser said arguments over the records show both sides are gearing up for a trial over Holmes' sanity.

"They know it's not a question of who did this," Steinhauser said. "They know that the only possible defense is that he was not sane at the time."

School records don't have the same legal protection as communication between a doctor and patient. Steinhauser said the records might help prosecutors establish that Holmes implicitly waived his right to privacy if he talked about some of the same things he spoke to his doctor about.

Educational records released by the University of Illinois, Urbana-Champaign, a school Holmes considered attending, contained a letter of recommendation that described Holmes as having "a great amount of intellectual and emotional maturity."