Ahmad Al Aliwi Alissa, of Arvada, near Denver, is accused of opening fire Monday afternoon at the King Soopers store in the university city of Boulder, killing people ranging in age from 20 to 65, authorities said.
Police took the suspect into custody at the store Monday afternoon, less than an hour after panicked 911 callers told dispatchers of the killings unfolding there.
Alissa, who at some point was shot in the leg, was in stable condition at a hospital Tuesday, and will be jailed after his treatment is finished, authorities said.
The motive in the Boulder killings -- one of several mass shootings in the US over the last week -- isn't immediately known, and the investigation will take a long time, authorities said.
"I promise that all of us here will work tirelessly ... to make sure that the killer is held absolutely and fully accountable for what he did," Boulder County District Attorney Michael Dougherty said Tuesday at a news conference in Boulder.
Police on Tuesday also released the names of those killed: Denny Stong, 20; Neven Stanisic, 23; Rikki Olds, 25; Tralona Bartkowiak, 49; Suzanne Fountain, 59; Teri Leiker, 51; Boulder police Officer Eric Talley, 51; Kevin Mahoney, 61; Lynn Murray, 62; Jody Waters, 65.
Officers had exchanged gunfire with Alissa at the store, but it wasn't clear who shot him, Boulder Police Chief Maris Herold said.
The suspect has "lived most of his life in the United States," Dougherty said Tuesday, without elaborating.
Witnesses describe terror and panic
Witnesses have described scenes of terror and panic at the supermarket Monday.
Police said they were called there about gunfire around 2:40 p.m. MT Monday; the suspect was taken into custody at 3:28 p.m., Herold has said.
A shooter had gunned down at least one person in the parking lot before going inside, according to Anna Haynes, a college student who was looking from her apartment window across the street.
Haynes heard what turned out to be gunshots, and then looked outside and "saw a body in the middle of the parking lot. "
"On his way to the entrance, had turned around and was shooting rapid-fire at one particular target. ... And then he turned around, he entered the building through the handicap entrance.
"And a few seconds later, I saw people running out of the building, I heard screaming, I heard people leaving in their cars, and it just evolved into chaos within just a couple of minutes."
They and others gathered with employees in the back.
"I saw a lot of very wide eyes. ... The employees in the back of the house didn't know what was going on, so we told them that there was a shooter, and they told us where the exit was," he told CNN Tuesday.
The man had what appeared to be blood on his arm and right leg and his hands appeared to be cuffed behind him as two officers escorted him away. The man was taken away in an ambulance.
Police didn't immediately say whether that person was involved in the shooting.
Police officer and a store manager among those killed
The slain officer, Talley, was one of the first to respond to the scene, according to Herold. Talley had joined the Boulder police force in 2010, she said.
"He was, by all accounts, one of the outstanding officers of the Boulder Police Department, and his life was cut far too short," Dougherty said.
Olds, 25, of Lafayette, was a front-end manager at the store, her uncle, Bob Olds, told CNN.
She was a "strong, independent young woman" who was raised by her grandparents, Bob Olds said.
"She was so energetic and charismatic and she was a shining light in this dark world," he told CNN.
What authorities say happened
Boulder police tweeted about 2:49 p.m. (4:49 p.m. ET) that there was an "Active Shooter at the King Soopers on Table Mesa. AVOID THE AREA."
In scanner traffic, officers radioed that they were in a gunfight. They continued to report that they were being fired at with multiple rounds through at least 3:21 p.m. local time.
Ambulances and multiple law enforcement agencies arrived at the store, which is part of a large shopping center with a two-story strip mall next door. "He's armed with a rifle, our officers shot back and returned fire -- we do not know where he is in the store," an officer said, according to a transcript of the audio.
One senior law enforcement source told CNN the weapon used in the shooting was an AR-15-style rifle.
Steven McHugh said his son-in-law and two granddaughters were there when a gunman attacked.
"The intensity, the awfulness is going to last for the rest of their lives," he said.
At one point, police were seen moving on the roof. McHugh told CNN affiliate KCNC that his relatives were evacuated via the roof.
"They hid, ran upstairs, were hiding in a coat closet for the last hour," McHugh told KCNC. "Half a dozen cops came in through the roof and got them and then told them, you know, 'Stay quiet.'"
Calls for action against gun violence
On the heels of March 16's three spa shootings in Atlanta, the latest attack stoked calls for action and expressions of fear.
The tragedy in Colorado feels especially personal, Giffords said, considering how the shooting she survived outside a Tucson grocery store devastated her community.
US Sen. Michael Bennet, D-Colorado, also called for a national gun violence conversation and nonpartisan action.
"It's long past time for Congress to take meaningful action to keep deadly weapons out of the wrong hands," he said.
King Sooper is owned by the Kroger company, which said the store will remain closed during the police investigation.
Correction: An earlier version of this story misspelled victim Denny Stong's last name based on information provided by the Boulder Police Department.
CNN's Konstantin Torpoin, Alisha Ebrahiumji, Steve Almasy, Paul P. Murphy, Melissa Gray, Keith Allen, Kelsie Smith, Deanna Hackney, Dianne Gallagher and Joe Sutton contributed to this report.