Defense lawyers for the man accused of opening fire in a US theater in July, killing 12 and wounding dozens more, readied Wednesday to call witnesses in a bid to stop the case from going to trial.

The preliminary hearing, which began on Monday, has been emotionally harrowing as relatives and police choked back tears or wept openly at testimony describing the slaughter at a packed midnight screening of the Batman film "The Dark Knight Rises".

Prosecutors have closed their case for the alleged gunman, James Holmes, to face trial. Next up, defense lawyers are expected to highlight Holmes' mental instability as a possible reason he should not.

Offering a preview of that strategy at the hearing Tuesday, defense attorney Tamara Brady asked federal firearms supervisor Steven Beggs if there was a process in Colorado "to screen out purchases by a severely mentally ill person."

"No," replied Beggs, who detailed for the prosecution how Holmes had purchased more than 6,000 rounds of ammunition in the months before last July's shooting in Colorado, both online and in person.

Curious behavior by Holmes during police questioning was also recounted: at one point he tried to stick a metal staple into a power socket. At another, he played hand puppets with gloves that had been put on him to preserve evidence.

On Tuesday, the prosecution finished presenting its evidence aiming to show Holmes had drawn up an elaborate plan for mass murder.

FBI bomb technician Garrett Gumbinner said Holmes told investigators after being arrested that he had booby-trapped his apartment, in an attempt to draw emergency responders away from the theater shooting site.

Officers found a trip wire at the door of his home, rigged to set off flame and sparks that would catch the gasoline-soaked carpet and go on fire.

There were six-inch fireworks shells filled with improvised thermite, a hot-burning explosive.

"You can't put it out with water," Gumbinner told judge William Sylvester. There were also three containers of improvised napalm, 11 bottles of gasoline and other chemicals intended to act as fire accelerants, he said.

There were three systems in the apartment intended to initiate the explosive devices, including one linked to a trash bag near the apartment dumpster by a remote control.

Aurora police officer Tom Welton testified that Holmes made postings on two dating websites earlier in July, asking "Will you visit me in prison?"

Prosecutors played frantic 911 calls from inside the theater as the massacre was taking place, creating a vivid picture of the terror and confusion within and capping testimony from a day earlier of the devastation police found when they arrived.

In the first of 41 calls made in a 10-minute period in Colorado, 30 loud booms could be heard in less than half-a-minute, making it difficult for the 911 dispatcher to distinguish what was being said.

In another, six minutes after the first call was logged at 12:38 am, 14-year-old Kaylan Bailey told the emergency operator that her two cousins had been shot, and that one of them did not appear to be breathing.

"We need to start CPR (cardio-pulmonary resuscitation) on your cousin who's not breathing," said the operator.

"I can't hear you," responded Bailey, as chaos unfolded in the theater in Aurora, where Holmes -- clad in body armor and a mask -- threw at least one smoke-bomb type device before opening fire in the early hours of July 20.

The hearings opened Monday with officers fighting back tears as they recalled heartbreaking scenes after the slaughter, in which the youngest victim was just six years old.

A day later, prosecutors wrapped up their evidence in the hearing by listing all the victims by name, the injuries they suffered and the charges -- more than 160 in all -- filed on behalf of each.

The Aurora massacre revived the perennial US debate over gun control -- an issue re-ignited even more intensely by last month's shooting of 20 young children at a Connecticut elementary school.

[Image via Agence France-Presse]