•The suspect entered a busy supermarket on Saturday afternoon before opening fire. He used a camera to stream the attack online, police said.
•US President Joe Biden has condemned what he called an "abhorrent" attack.
Ten people have been killed in a shooting in New York state that is being investigated as a racially-motivated hate crime.
An 18-year-old man wearing military gear was arrested after a stand-off at the scene in the city of Buffalo.
The suspect entered a busy supermarket on Saturday afternoon before opening fire. He used a camera to stream the attack online, police said.
US President Joe Biden has condemned what he called an "abhorrent" attack.
"We are investigating this incident as both a hate crime and a case of racially-motivated violent extremism," Stephen Belongia, the agent in charge of the FBI's Buffalo office, told a news conference.
The suspect is believed to have driven for several hours to reach the predominantly black area of the city. Thirteen people were shot in total and the majority of the victims were black, Buffalo Police Commissioner Joseph Gramaglia said.
Speaking to CBS, a police source alleged that the man had shouted racial slurs during the shooting.
The three wounded victims - who all worked at the supermarket - have not sustained life-threatening injuries.
A retired police officer who was working as a security guard tried to shoot the suspect but was among those killed, officials said.
The suspect was carrying a high-powered rifle and wore body armour as well as a helmet, police said. He surrendered his weapon after a tense stand-off and was taken into custody.
He has since been charged in court with first-degree murder, according to Erie County District Attorney John Flynn. He added that further charges may still be brought.
"This is the worst nightmare that any community can face and we are hurting, we are seething right now," Buffalo Mayor Byron Brown told reporters.
"We cannot let this hateful person divide our community or our country," he added.
Grady Lewis, who witnessed the attack from across the street, told local media that he saw the man open fire. "I saw the guy go in, army-style, bent over, just shooting at people," he said.
Shonnell Harris, who was working in the shop during the attack, told Buffalo News that she heard more than 70 shots as she ran to escape the building through a backdoor.
"The store was full. It was the weekend," she said. "It feels like a nightmare."
Describing the aftermath of the attack, one police officer told Buffalo News: "It's like walking onto a horror movie, but everything is real. It is Armageddon-like".
Later on Saturday, New York Governor Kathy Hochul said the suspect was a "white supremacist who has engaged in an act of terrorism".
This was "a military style execution targeting people who simply wanted to buy groceries in a neighbourhood store," she said while visiting Buffalo.
In a statement, US President Joe Biden said he and the First Lady were praying for the victims and their families.
"A racially-motivated hate crime is abhorrent to the very fabric of this nation," he said. "We must do everything in our power to end hate-fuelled domestic terrorism."