The suspect, Kori Ali Muhammad, a 39-year-old African-American, shouted "Allahu Akbar" - "God is great'" in Arabic - as he was being taken into custody.
But Fresno police chief Jerry Dyer said indications were it wasn't a "terrorist-related crime," and that a probe was under way to determine if the slayings qualified as a hate crime.
He said Muhammad, who used the alias "Black Jesus" and was wanted in the killing last week of an unarmed security guard outside a motel in the city, had indicated in Facebook postings that he hated white people and the government.
"This was a random act of violence," Dyer said. "These were unprovoked attacks by an individual who was intent on carrying out homicides today."
All the victims were white males, and police believe Muhammad had acted alone.
Muhammad's father, Vincent Taylor, told the Los Angeles Times that his son was convinced he was part of an ongoing war between whites and blacks, and that "'a battle was about to take place."
A Facebook page for a Kori Ali Muhammad in Fresno featured images extolling black nationalism and making repeated references to "white devils," the newspaper said.
When Muhammad was a teenager, he legally hanged his name from Kori Taylor, his grandmother, Glenestene Taylor, told the daily.
Muhammad now faces four counts of murder, and two charges of attempted murder, authorities said.
Dyer said Tuesday's shooting spree began in downtown Fresno when one man sitting in a truck was shot through the passenger window.
The other victims were shot nearby during a rampage that lasted about a minute, and during which up to 16 rounds were fired.
Dyer said Muhammad surrendered to police at the scene, telling officers "'you guys are looking for me."
The suspect had a criminal history, including weapons and drugs violations, and making terrorist threats, Dyer said.
He added Muhammad was known to be homeless at times, and had associated with gangs.