US President Joe Biden has condemned white supremacy as "a poison running through our body politic" during a visit to Buffalo, New York.
Ten black people were killed at a supermarket in the city on Saturday in what is believed to be a racially motivated hate crime.
The suspect, 18, identified himself as a fascist and white nationalist in a document posted online.
Mr Biden on Tuesday said the young man belonged to "a hateful minority".
After meeting with families impacted by the shooting, he eulogised the victims for their "individual lives of love, service and community that speak to the bigger story of who we are as Americans".
"White supremacy will not have the last word," he said.
Local officials say the alleged attacker drove more than 320 km (200 miles) to deliberately seek out an area with a high black population. He would have continued to target other such areas if he had not been stopped, according to investigators.
In his so-called manifesto, he referenced "white genocide" and "white replacement" conspiracy theories to explain his resentment towards minority groups.
Black Buffalo residents tell of grief and fear
How far-right killers are radicalised online
The president accused the shooter of giving into "a hateful, perverse ideology rooted in fear and racism".
Making mention of the deadly far-right extremist rally in Charlottesville, Virginia in 2017 - the incident he says persuaded him to run for office again - he warned that America's democracy was "in danger like it hasn't been in my lifetime".
"Hate and fear have been given too much oxygen by those who pretend to love America but don't understand America," Mr Biden said.
"I call on all Americans to reject the lie and I condemn those who spread the lie for power, political gain and profit. We cannot remain silent."
President Biden's main objective in visiting Buffalo was to be a consoler in chief of sorts.
He has suffered profound loss in his own life. His first wife and 13-year-old daughter were killed in a car crash and later in life he lost one of his sons to brain cancer.
He told the families that one day the memory of their loved one would bring a smile to their face before it brought a tear to their eye.
Still, while the people here say they appreciate the sympathy and prayers, they want action.
President Biden can offer little new on that front, and he admitted as much on Air Force One as he returned to Washington.
On gun control and banning assault weapons, he said he would try to convince Congress but it would be very difficult.
On domestic terrorism, he said there were enough laws on the books and that the country just needed to "look in the mirror and face the reality."
Mr Biden held individual meetings with grieving families and also visited the makeshift memorial outside the Tops grocery store that was the site of Saturday's rampage.
Buffalo Mayor Byron Brown told media that the president had "seemed very moved by what he saw in the community" and he was hopeful for more action on gun control.
The president was joined on Tuesday's trip by First Lady Jill Biden, New York's Democratic senators and other top officials.