CENTENNIAL, Colo.--James Holmes, the 24-year-old charged in last month's deadly Aurora, Colo., theater shooting, is mentally ill, his lawyers disclosed during a court appearance that featured an unusual outburst on Thursday.

Chief District Judge William Sylvester heard testimony from representatives of more than 20 news organizations asking for search warrants and other records related to the case to be unsealed.

Both the prosecution and defense argued that releasing such information would jeopardize their respective cases.

"The prosecution's duty in this case is to ensure a fair trial with a just outcome," Jacob Edson, an attorney for the prosecution, said. "We are not even three weeks from the date of this crime. Law enforcement has been working very hard to interview witnesses and victims. This is not an ordinary case."

[Related: Judge accused of creating 'unusual shroud of secrecy']

"The public is completely in the dark about what is going on in this judicial proceeding," Steven Zansberg, the attorney for several media organizations, told the judge.

Sylvester, who had issued the gag order, said he would not decide on the matter until next week.

Holmes, the former Ph.D student, looked as he has in previous court appearances: his hair dyed orange, dressed in a maroon prison jumpsuit. He did not speak during the hearing, but had "the same dazed demeanor," the Associated Press said.

There was some drama during Thursday's mostly procedural hearing. A woman seated in the second-to-last row of the courtroom stood up and said she had evidence of judicial misconduct on behalf of the public defender.

"I tried to deliver information vital to the defense of James Holmes to the public defender," the woman--in a red dress with a shaved head--said, her voice shaking.

[Also read: How the media should cover mass shootings, and why it can't]

The woman, who was held by two deputies, said the defense team told her they were not willing to speak to Holmes about that information.

Story continues

"It will do the victims' families justice to have this information," the woman, who identified herself as Allison Michelle Ernst, said as she was led out of the courtroom.

Twelve people were killed and 58 others injured in the July 20 massacre at a midnight screening of "Dark Knight Rises."

With reporting by Timothy Skillern in Colorado.