A gunman has killed 10 people, including a police officer, following an hours-long stand-off at a grocery market in the US state of Colorado.
The attack in Boulder ended with police detaining an injured suspect at the King Soopers market.
The shooting was live-streamed by witnesses and broadcast on YouTube.
Among the dead was 51-year-old Eric Talley, who was the first police officer to respond to the shooting.
“This is a tragedy and a nightmare for Boulder County,” the area’s district attorney, Michael Dougherty, said.
“These were people going about their day, doing their shopping. I promise the victims and the people of the state of Colorado that we will secure justice.”
No other details have been released about the nine other victims or a motive for the attack.
The grocery store is located in a busy shopping plaza in Boulder, a north-central Colorado city about 30 miles (50km) away from the state capital of Denver.
The supermarket attack comes less than a week after a mass shooting that left eight dead, including six Asian women, at three spas in Atlanta.
Atlanta shootings: How we talk about violence
What do we know about the shooting?
The incident began at about 14:30 local time (20:30 GMT) on Monday when the suspect entered the supermarket and began firing.
Shoppers and employees of the store said they had to dive for cover or run to safety as the shooting unfolded.
Some of the stand-off was captured on camera by a passer-by, showing victims near the grocery store.
“I don’t know what’s going on… I heard gunshots, someone’s down,” the cameraman shouts. “There’s an active shooter, get away”.
Gunshots can be heard as he runs away from the shop.
The video continues, with police arriving on the scene and surrounding the market.
The Boulder police department later warned people to avoid the area and told them not to “broadcast on social media any tactical information you might see”.
“We were at the checkout, and shots just started going off,” said Sarah Moonshadow, a customer caught up in the shooting with her son Nicholas.
She told Reuters she had tried to help one of the victims lying on the pavement outside the store, but her son pulled her away saying “we have to go”.
“I couldn’t help anybody,” she said.
Ryan Borowski, who was also inside the store, told CNN he could not believe what had happened in his town: “This feels like the safest spot in America, and I just nearly got killed for getting a soda and a bag of chips.”
Eyewitnesses said the suspect was armed with a rifle. A police source told CNN it was an AR-15 style rifle, a semi-automatic gun that has been used in several mass shootings across the US.
Aerial footage later showed a handcuffed, shirtless man with an apparent injury to his leg being put onto a stretcher for treatment. Authorities did not say whether he was the suspect or not.