BOULDER, Colo. — Ten people were killed at a King Soopers grocery store on Monday, including a Boulder police officer, after a shooter opened fire on customers and responding officers.

Law enforcement officials said the suspect, who carried out the attack with a rifle, was in custody, but they offered scarce details about the deadly shooting, including any information about a possible motive.

Boulder Police Commander Kerry Yamaguchi said in a brief news conference that the suspect was being treated for an injury. Boulder County District Attorney Michael Dougherty said officials were still working to notify family members of the victims.

Boulder Officer Eric Talley, 51, who was among the first to respond, was among those killed by the shooter, Police Chief Maris Herold said. Herold vowed that police will “work night and day” to complete the investigation, which she said will take no less than five days.

“I want to reassure the community that they are safe and that we will try to make our best to identify the victims and work with the coroner’s office as prompt as possible,” said Herold, holding back tears.

The rampage was the latest in a long history of mass shootings in the Denver area, and comes as the nation is still grappling with a devastating attack in Atlanta that left eight people dead, including six Asian women, less than a week earlier.

Dozens of emergency vehicles lined the streets around the store Monday afternoon during a massive response to what police said was an “active shooter” situation at the store. Witnesses described a chaotic scene, with customers rushing to exits at the front and back of the supermarket after shots were fired. One witness told local media that the shooter did not say anything before opening fire.

Ryan Borowski, 37, had gone to King Soopers to grab a bag of chips and a soda.

Borowski said he was walking up to the checkout area at about 2:30 p.m., when he heard a loud bang.

“My first hope was that it was an employee who dropped something,” he said. Then came the second bang. “By the third bang I was running. It was bang, bang, bang, bang, bang! I was thinking around eight.”

He added: “I saw a woman shorter than myself with a terrified look on her face running toward me, and at this point I turned, and people were saying things like: ‘Run, run! Go, run!’ Everybody was running, and everybody was scrambling.”

Borowski and a group of customers and employees ran toward the back of the store in a line, placing their hands on top of one another’s backs so they wouldn’t leave anyone behind, he said. “Don’t stop! Keep going!” he recounted telling people.

The group exited through the loading dock in the back of the store, he said, then hid under a semi-truck for a moment before running up a hill to the parking lot of a nearby Whole Foods.

Officials said at least 10 people were fatally shot at a King Soopers grocery store in Boulder, Colo., on March 22. (The Washington Post)

Video from a witness who was live-streaming on YouTube from the King Soopers parking lot showed at least two people injured and motionless on the ground outside and a third just inside the front doors.

“There are gunshots inside the store! People ran out of the back door! The active shooter is still in there!” the witness shouted.

The live video showed heavily armed officers surrounding the building — with its front windows broken — and police could be heard trying to communicate with the attacker via bullhorn. At one point, officers were lifted onto the roof in a cherry picker.

Around 3:30 p.m. local time, a man in handcuffs who was bleeding down his leg was guided away from the building by police. Officials did not confirm whether the bleeding man was the suspect.

Tributes poured in on Monday evening for Talley, who had served as a Boulder officer since 2010.

Jeremy Herko, a friend, said he met Talley at the Community College of Aurora’s Police Training Academy in 2010. Herko said Talley had a job in information technology and a master’s degree, but decided to become an officer after a close friend died in a DUI crash.

“It was remarkable to me that somebody would go to law enforcement from IT,” said Herko, who is now a lieutenant with the Arapahoe County Sheriff’s Office. “He lost pay. He lost time away from his family. He joined the police academy without a guaranteed job.”

But Talley thrived after joining the police, Herko said. “He absolutely loved his job and wanted to serve the community despite my best efforts to talk him out of it,” he said.

Herko said Talley is survived by his wife and seven children.

In the hours after the shooting, government officials shared their sorrow and condolences.

“My heart is breaking as we watch this unspeakable event unfold in our Boulder community,” Colorado Gov. Jared Polis (D) said in a statement. “We are making every public safety resource available to assist the Boulder County Sheriff’s Department as they work to secure the store.”

Polis had said earlier that he was “closely watching unfolding events.”

Rep. Joe Neguse (D-Colo.) sent his prayers to the Boulder community, first responders and law enforcement who responded to the “terrible incident,” he wrote on Twitter.

Meanwhile, those who experienced and survived the attack offered details of the horrific scene. A witness who spoke to the Denver Post said the gunman did not say anything — “he just came in and started shooting.”

Andy Arellano, 35, said he was working in the King Soopers meat department when he started to hear shots like “big hammers on a metal table.”

“At the first, it was just like boom, boom, boom — it was three,” the Boulder resident said. “Then suddenly boom, boom, boom, boom, and that’s when all the people started running.”

Employees and customers ran out of the back of the store, Arellano said. He never saw the shooter.

“I could hear the shots getting closer and closer,” he said. “The shots were so close that I started hearing that ringing bell with the gunshots.”

While waiting outside the police barrier across the street from the crime scene, he tried to contact co-workers. “I’m trying to, like, call my friends to see if they’re okay, and there’s no word of them.”

A man named Steven told 9News that his grandchildren were inside the store during the shooting. He said they hid in a closet as the incident unfolded and as police dropped into the store through the roof.

Daniel Douglas was in the supermarket picking up lunch and flowers for his girlfriend when the gunshots began.

“Nobody knew what was going on, so we started screaming, ‘Hit the ground,’” he told Fox 31 Denver.

At some point, he said, the shooter moved to the front of the store, while Douglas and other customers rushed to the back of the building, where he said many others were hiding and trying to escape. A co-worker who was with him at the moment had to kick the emergency-exit door open so people could get out, he said.

“A lot of people were petrified. A lot of people were crying,” he said.

Another man, who said he was on his way to pick up coffee at the store, walked away from the incident unharmed. He told Fox 31 he was “terrified” and “in shock” when he realized what was happening.

He said he called his mother to let her know he was all right, then “it all kind of sunk in and I started panicking.”

“The fact that it’s happening all over America,” he added, “seeing it on the news, like, something I’ve grown up with, like people my age and my generation — we’re used to this, and it’s just never something that I think would happen in my town.”

There have been as many as nine school shootings in the area since the Columbine massacre in 1999, which left 12 students and a teacher dead. Four other major shootings have occurred within 20 miles of the suburban Columbine High School, including a 2012 shooting at a movie theater in Aurora that left 12 dead.

This is a developing story and will be updated.

Annie Gowen, Nicki DeMarco and Justin Scuiletti contributed to this report.