Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

The California man accused of killing three men in a random shooting spree in Fresno on Tuesday is a hate-filled racist who'd planned "to kill as many white males as possible," the police chief said Wednesday.

Kori Ali Muhammad, 39, surrendered to police Tuesday after having fired 17 shots in less than a minute at four locations in an area near Fresno's office of Catholic Charities, police said.

The victims were identified Wednesday as Zackary David Randalls, 34, of Clovis, and Mark James Gassett, 37, and David Martin Jackson, 58, both of Fresno.

Muhammad is black, and all of Tuesday's victims were white. Social media accounts linked to Muhammad expressed anti-white and anti-government sentiments, Police Chief Jerry Dyer said, and he has advocated creation of a separate country for all of the United States' non-white residents.

"Kori Muhammad is not a terrorist," Dyer said. "But he is a racist, and he is filled with hate."

Before Tuesday's events, Muhammad was already being sought in connection with the shooting death last week of Carl Williams, 25, a security guard at a Motel 6. Dyer said Muhammad confessed to having shot Williams "because he felt that Williams had disrespected him."

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Muhammad has been charged with murder in that shooting, Dyer said, and he will likely face three more murder charges because of Tuesday's shootings.

A memorial of candles and flowers grows Wednesday at the scene of Tuesday's triple homicide near Catholic Charities in Fresno, California. Craig Kohlruss / AP

Dyer confirmed that Muhammad yelled "Allahu Akbar" ("God is great" in Arabic) as he was being loaded into a police car Tuesday, but he said the suspect told investigators that he hadn't attended a mosque in at least 25 years and was a practitioner of voodoo who prays to seven gods, primarily Aguna.

Aguna is a name attached to practices or gods in a number of religions, but she is most prominently the supreme goddess of the minority aboriginal animist community in the Solomon Islands.

Dyer said Wednesday that after the motel shooting last Thursday, Muhammad hid out in a ravine "practicing 'voodoo rituals.'"

Wearing amulets and charms to protect himself from evil, Muhammad went to a Starbucks, where he was able to get Wi-Fi, and he quickly learned that he had been identified as the suspect in Williams' death, Dyer said.

Kori Ali Muhammad in an arrest mug Tuesday. Fresno Police Department

Determined not to die for having killed a security guard, Muhammad decided that he would "go out" by killing "as many white males as possible" using a .357 Magnum revolver he called "the Black Python," Dyer said he told investigators.

In Muhammad's view, "white people were responsible for keeping the black people down," said Dyer, who described Muhammad as "callous and laughing" throughout the interview.

Muhammad took investigators to the shooting scenes and gave accounts "very consistent" with evidence authorities had gathered, Dyer said. Based on the evidence and Muhammad's statements, Dyer gave this account of the shootings:

Having learned that he was sought in Williams' death, Muhammad began roaming the area looking for white men to shoot. When he came upon a Pacific Gas and Electric Co. utility truck, he passed over the Hispanic driver and targeted Randalls, who was in the passenger seat.

Muhammad walked a couple of blocks and came upon a white man whose identity hasn't been made public. He fired two rounds and saw the man fall to the ground. The man wasn't hit.

Muhammad than fired one round at a passing car and began walking toward it. But when he saw that its occupants were two Hispanic women, broke off the attack, choosing instead to open fire on Gassett, whom he struck in the chest. Muhammad then stood over Gassett and fired two more rounds into him.

Reloading as he went, Muhammad walked toward a bus stop near Catholic Charities, where three men saw him and began to run away. Muhammad picked out Jackson to follow because he was older and "appeared to be heavier," Dyer said Muhammad told investigators.

Muhammad shot Jackson twice and ran off, ditching his gun, which still hasn't been recovered, Dyer said. He urged whoever had found it turn to turn it in to police as soon as possible.

Like Dyer, a former friend described Muhammad as intense and unnerving.

"I unfriended him about two years ago on Facebook," Jojo Romelo, who met Muhammad in 2014 at a nonprofit public access TV studio in downtown, told NBC station KSEE.

Muhammad seemed focused on his own anger and intent on pushing others away, Romelo said.

"I didn't like the way he was going," he said.