Ten people, including a police officer, have been killed by a gunman following an hours-long stand-off at a grocery store in Boulder, Colorado.
The attack 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 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.
The incident began at about 14:30 local time on March 22 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.
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”.
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.
Speaking at a press conference, Boulder police chief Maris Herold confirmed that a suspect was in custody and was receiving hospital treatment.
Maris Herold named the officer killed as Eric Talley, a father of seven who had been with the Boulder Police Department since 2010.
The names of the other victims will not be released until relatives have been informed.