Three white men were killed and another wounded when a black gunman opened fire in Fresno, California, in a suspected race attack, police have said.
Kori Ali Muhammad shot 16 rounds in 90 seconds in the shooting spree on Tuesday, said Police Chief Jerry Dyer.
He shouted "God is greatest" in Arabic when arrested but this was a hate crime not terrorism, Mr Dyer believed.
Mr Muhammad, 39, was also wanted for the murder of a security guard outside a motel in the city last week.
The mass shooting may have been sparked by the release of his photo to the media on Tuesday afternoon, police say.
Dozens of people marched to the downtown shooting scene on Tuesday afternoon to show support for "peace and reconciliation".
A Muslim leader in the city said Mr Muhammad did not represent Islam.
All four victims were white men, and one of them was shot sitting in a car. Media in the city named him as Zackary Randalls, a 34-year-old father of two who was on his first day in his new job as a utility worker.
Family members identified another victim as 37-year-old Mark Gassett, who had just left Catholic Charities with a shopping bag of food when he was shot, his family said.
The suspect had indicated on social media that he hated white people and expressed anti-government views, police said.
"He wanted to kill as many people as he could and that's what he set out to do," said Mr Dyer.
"This was a random act of violence. These were unprovoked attacks by an individual who was intent on carrying out homicides today."
Mr Dyer added that Tuesday's attack "has nothing to do with terrorism in spite of the statements that he [Kori Ali Muhammad] made".
"He did clarify that the reason he had made that statement was that in the event that anything did happen to him that he was in fact pledging his allegiance to God for protection."
How Fresno's Muslim community reacted
The most recent statistics compiled by the University of Southern California's Center for Religion and Civic Culture showed that Fresno, a city of just over 500,000 people, had a Muslim population of just over 1,800 in 2000.
In a statement on Facebook, the Islamic Cultural Center of Fresno condemned the attack, saying: "The phrase Allahu Akbar, or God is Great, is a prayer of peace for 1.8 billion Muslims around the world."
The centre's Imam, Seyed Ali Ghazvini, said Mr Muhammad was not known to them.
"This individual does not represent our faith or our community," he told the Fresno Bee newspaper. "This individual does not represent your Muslim neighbour, your Muslim classmate or your co-worker. The Muslim community in the Valley are working hard for the well-being of our society and country."
The shooting began around 10:45 local time near the headquarters for Catholic Charities.
Witnesses said they saw a man carrying a large handgun, reportedly a .357 revolver, which he reloaded several times between shots.
Police were not able to immediately find the gun, and believe it may have been picked up by a passerby.
Mr Muhammad's father later told the Los Angeles Times that his son believed he was part of an ongoing war between whites and blacks and that "a battle was about to take place". He went by the nickname Black Jesus.
Mr Muhammad, who was born as Kori Taylor, was imprisoned in 2005 for gun and cocaine charges.
A former classmate at the Fresno City College said he would often not show up for classes for weeks at a time, and accuse his instructors of being racist.
"He's very, very unstable," Derek Bavin told KSEE-TV News.
Some 13,286 people were killed in the US by firearms in 2015, excluding suicides, according to the Gun Violence Archive.