A gunman has killed 10 people, including a police officer, following an hours-long stand-off at a grocery store 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.
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.
Speaking at a press conference, Boulder police chief Maris Herold confirmed that a suspect was in custody and was receiving hospital treatment. "I want to reassure the community that they are safe," she said.
Ms Herold named the officer killed as Eric Talley, a father of seven who had been with the Boulder Police Department since 2010.
"The heroic action of this officer when he responded to the scene... phone calls of shots fired in the area and a phone call about a possible person with a patrol rifle," she said.
Ms Herold did not provide further details about the shooting, but said that the investigation was "very complex" and would take "no less than five days to complete".
The names of the other victims will not be released until relatives have been informed.
What's been the reaction?
"Today we saw the face of evil. I am grieving with my community and all Coloradans," tweeted Colorado Governor Jared Polis.
The supermarket shooting was the seventh mass killing so far this year following a lull in mass killings during the pandemic last year, according to a database compiled by the Associated Press (AP), USA Today and Northeastern University. The database defines mass killings as four or more dead.
It has already led to renewed calls for tighter gun controls in the US, a starkly divisive issue that has seen little in the way of change over the years despite hundreds of mass shootings.
Former Arizona congresswoman Gabrielle Giffords, a gun control advocate who was seriously injured in a mass shooting in 2011, said: "It's been 10 years and countless communities have faced something similar... this is not normal."
Today it's a tragedy in Boulder, Colorado. This past weekend it was a house party in Philadelphia. And last week it was an armed attack on Asian American women in the Atlanta area. It doesn't have to be this way. It’s beyond time for our leaders to take action.— Gabrielle Giffords (@GabbyGiffords) March 23, 2021
Responding to the news, US Senate Democratic leader Chuck Schumer said on Twitter: "This Senate must and will move forward on legislation to help stop the epidemic of gun violence."
President Joe Biden, who has been briefed about the latest attack, said last month he would be recommending tougher legislation to ensure background checks on anyone wishing to purchase a firearm.
Freshman Republican Congresswoman Lauren Boebert, a staunch defender of gun rights, tweeted that she was "praying for the police, first responders, and those affected by this tragedy".
The right to bear arms is protected by the Second Amendment to the US constitution and is staunchly defended by many conservatives, including ex-president Donald Trump.
The state of Colorado has seen a number of mass shootings over the last few decades, including the 1999 Columbine High School attack that left 12 students and a teacher dead and the 2012 attack at a cinema in Aurora that killed 12 people.