Police officials said the 18-year-old gunman, who is white, was wearing body armor and military-style clothing when he pulled up and opened fire at people at a Tops Friendly Market, the shooting streamed via a camera affixed to the man's helmet.
"He exited his vehicle. He was very heavily armed. He had tactical gear. He had a tactical helmet on. He had a camera that he was livestreaming what he was doing," city Police Commissioner Joseph Gramaglia said at a news conference afterward.
Gramaglia said the gunman initially shot four people outside the store, three fatally. Inside the store, a security guard who was a retired Buffalo police officer fired multiple shots at the gunman and struck him, but the bullet hit the gunman's bulletproof vest and had no effect, Gramaglia added. The commissioner said the gunman then killed the security guard.
Video also captured the suspect as he walked into the supermarket where he shot several other victims inside, according to authorities.
Police said 11 of the victims were Black and two are white. The supermarket is in a predominantly Black neighborhood a few miles (kilometers) north of downtown Buffalo.
President Joe Biden issued a statement about the shooting.
"Tonight, we grieve for the families of ten people whose lives were senselessly taken and everyone who is suffering the physical and emotional wounds of this horrific shooting. We are grateful for the bravery of members of law enforcement and other first responders who took immediate action to try to protect and save lives. The First Lady and I are praying for the victims and their families, and hearts all across this country are with the people of Buffalo," Biden said. "We still need to learn more about the motivation for today's shooting as law enforcement does its work, but we don't need anything else to state a clear moral truth: A racially motivated hate crime is abhorrent to the very fabric of this nation. Any act of domestic terrorism, including an act perpetrated in the name of a repugnant white nationalist ideology, is antithetical to everything we stand for in America. Hate must have no safe harbor. We must do everything in our power to end hate-fueled domestic terrorism."
WATCH: New York Gov. Kathy Hochul provides update on deadly shooting
"This is the worst nightmare that any community can face, and we are hurting and we are seething right now," Buffalo Mayor Byron Brown said at the news conference. "The depth of pain that families are feeling and that all of us are feeling right now cannot even be explained."
Gramaglia said Buffalo police entered the store and confronted the gunman in the vestibule.
"At that point the suspect put the gun to his own neck. Buffalo police personnel -- two patrol officers -- talked the suspect into dropping the gun. He dropped the gun, took off some of his tactical gear, surrendered at that point. And he was led outside, put in a police car," he said.
The suspected gunman was later identified as Payton Gendron, of Conklin, a New York state community about 200 miles (320 kilometers) southeast of Buffalo, two law enforcement officials told The Associated Press. The officials were not permitted to speak publicly on the matter and did so on the condition of anonymity.
Wearing a hospital gown, Gendron was arraigned in court Saturday evening on first-degree murder charges and ordered detained without bail. Another court hearing is scheduled for next week.
At the earlier news briefing, Erie County Sheriff John Garcia pointedly called the shooting a hate crime.
WATCH: Authorities provide update on deadly supermarket shooting
"This was pure evil. It was straight up racially motivated hate crime from somebody outside of our community, outside of the City of Good neighbors ... coming into our community and trying to inflict that evil upon us," Garcia said.
Elsewhere, NAACP President Derrick Johnson issued a statement in which he called the shooting "absolutely devastating."
"Our hearts are with the community and all who have been impacted by this terrible tragedy. Hate and racism have no place in America. We are shattered, extremely angered and praying for the victims' families and loved ones," he added.
Separately, the Rev. Al Sharpton called on the White House to convene a meeting with Black, Jewish and Asian "to underscore the Federal government (is) escalating its efforts against hate crimes." In a tweet, Sharpton said that "leaders of all these communities should stand together on this!"
The shooting came little more than a year after a March 2021 attack at a King Soopers grocery in Boulder, Colorado, that killed 10 people. Investigators have not released any information about why they believe the man charged in that attack targeted the supermarket.
At the scene in Buffalo on Saturday afternoon, police closed off an entire block, lined by spectators, and yellow police taped surrounded the full parking lot.
Witnesses Braedyn Kephart and Shane Hill, both 20, pulled into the parking lot just as the shooter was exiting. They described him as a white male in his late teens or early twenties sporting full camo, a black helmet and what appeared to be a rifle.
"He was standing there with the gun to his chin. We were like what the heck is going on? Why does this kid have a gun to his face?" Kephart said. He dropped to his knees. "He ripped off his helmet, dropped his gun, and was tackled by the police."
Tops Friendly Markets released a statement saying, "We are shocked and deeply saddened by this senseless act of violence and our thoughts and prayers are with the victims and their families."
At the White House, Press Secretary Karine Jean-Pierre said President Joe Biden was receiving regular updates on the shooting and the investigation and had offered prayers with the first lady for the victims and their loved ones.
"The president has been briefed by his Homeland Security advisor on the horrific shooting in Buffalo, N.Y., this afternoon. He will continue to receive updates throughout the evening and tomorrow as further information develops," she said.
Attorney General Merrick Garland was briefed on the shooting, Justice Department spokesperson Anthony Coley said.
More than two hours after the shooting, Erica Pugh-Mathews was waiting outside the store, behind police tape.
"We would like to know the status of my aunt, my mother's sister. She was in there with her fiance, they separated and went to different aisles," she said. "A bullet barely missed him. He was able to hide in a freezer but he was not able to get to my aunt and does not know where she is. We just would like word either way if she's OK."
Associated Press reporters John Wawrow in Buffalo and Eric Tucker in Washington contributed to this report. Balsamo reported from Washington and Collins reported from Hartford, Connecticut.
ABC News contributed to this report.