A police officer responding to the deadly Colorado theater shooting testified Tuesday that he asked James Holmes twice whether he had an accomplice, but Holmes only looked at him and smiled.

Officer Justin Grizzle described the smile as “a self-satisfying, offensive smirk” during a pretrial hearing over Holmes’ statements to police before he was read his Miranda rights.

Grizzle and Officer Jason Sweeney were among the first to arrive at the back exit to the theater on July 20, 2012, and found Holmes standing beside his car. It was a chaotic scene with screaming and bloodied victims still fleeing the theater as officers handcuffed Holmes and searched him.

They said Holmes didn’t resist when they told him first to raise his hands, then to lie on the ground.

Sweeney said that when he asked Holmes if there was another shooter, Holmes answered “No, it’s just me.”

Sweeney said officers couldn’t see through the tinted passenger side windows to detect whether anyone was inside, so they looked in through the open driver’s door. No one was inside.

“It was just chaos with everybody trying to figure out what was going on,” Sweeney said.

According to documents and testimony in the case, officers also asked Holmes questions about weapons and explosives. Roughly two hours would pass before the chaos subsided and detectives would read Holmes his rights — anything you say can be used against you.

Holmes’ lawyers argue that delay violated his constitutional rights and that anything he told the arresting officers should be barred from his trial.

Prosecutors say the officers urgently needed to know whether Holmes had an accomplice who could still be shooting and killing people at the Century 16 theater in Aurora. They contend the questions were legal under a public-safety exemption to the Miranda rule.

“There were many locations inside and outside of Theater 9 where other assailants could be hidden,” prosecutors wrote.

Barring the use of Holmes’ statements would likely have a limited impact on his trial because his lawyers have acknowledged he was the shooter and the trial is expected to focus on whether or not he was legally insane at the time of the shooting.

Holmes is accused of slipping into a suburban Denver theater and opening fire on more than 400 people who were watching a midnight showing of a Batman movie. Twelve were killed and 70 injured.

Holmes, then 24, had just quit a Ph.D. program in neuroscience at the University of Colorado, Denver.

He pleaded not guilty by reason of insanity to more than 160 counts of murder and attempted murder. His lawyers say he was in the grip of a psychotic episode.

Prosecutors are seeking the death penalty.

After the shooting, investigators say Holmes told officers that he had four guns and that bombs were rigged at his apartment to explode if anyone went inside.

Holmes was then driven to a police station where a detective again asked if anyone helped him. Sometime around 2:30 a.m. on July 21, a detective began reading Holmes his Miranda warning.