FRESNO, Calif. -- A man wanted in the slaying of a security guard set out to kill as many white people as he could on Tuesday, gunning down three men on the streets of downtown Fresno before he was captured and admitted to the shootings, authorities said.

Kori Ali Muhammad, 39, shouted “Allahu Akbar” -- meaning “God is great” in Arabic -- as police tackled the suspect to the ground after the shootings, Fresno Police Chief Jerry Dyer said.

Kori Ali Muhammad, 39, is caught by Fresno police after he’s suspected of killing at least three people on Tue., April 18, 2017. KGPE-TV

Authorities said earlier they were told the suspect disliked white people when in fact he posted those sentiments on social media instead.

Get Breaking News Delivered to Your Inbox

It doesn’t appear the shooting is connected to terrorism and Dyer said “this is solely based on race.”

“These individuals who were chosen today did not do anything to deserve what they got,” Dyer said. “These were unprovoked attacks by an individual that was intent on carrying out homicides today. He did that.”

Also on social media the suspect posted racially charged videos and phrases.

On what appeared to be Muhammad’s Facebook page, he repeatedly posted “#LetBlackPeopleGo” and encouraged “black warriors” to “mount up.”

Kori Ali Muhammad’s Facebook page.

A posting on Monday said, “My kill rate increases tremendously on the other side.” He also posted about “white devils” and on several occasions, posted status updates that included the phrase “Allahu Akbar.”

He linked almost daily to YouTube videos and an iTunes album titled “True Story Kori.” He appears on the cover of the album.

All three victims were white men, police said, and the victims appeared to be random, according to Dyer. Muhammad is black. Victims were between the ages of 34 and 58.

Dyer said Muhammad has a criminal history and has been arrested on weapons, drugs and false imprisonment charges and making terrorist threats. He had been associated with gangs but was not a validated member.

The scene of one of the deadly shootings by suspect Kori Ali Muhammad who was arrested shortly after on Tue., April 18, 2017. CBS Evening News

A resident said a 37-year-old victim was lying on the sidewalk leading to his front door and had appeared to be carrying groceries.

Stephen Hughes, 66, said he and his wife rushed home Tuesday after receiving a frantic call from a neighbor. They saw a body draped in a blanket.

Hughes said he’s lived for 40 years in the home, which is in a neighborhood lined with tall, mature trees.

The blanket was later removed and replaced by black screens, from which a pair of feet in black shoes and white socks could be seen. Nearby was a bag of groceries, partly spilled.

He first thought the shooting was gang-related, but then he noticed the bag of groceries near the body.

“This guy doesn’t look like a drug guy. It looks like a guy carrying his groceries home from the store,” Hughes said.

Sites of four fatal shootings by suspect Kori Ali Muhammad. CBS Evening News

The suspect had been wanted in connection to a killing last week, CBS affiliate KGPE-TV reported, in which a 25-year-old Motel 6 security guard was gunned down, the Fresno Police Department said.

Dyer also said the suspect wanted to kill as many white people as possible after seeing he was wanted in the death of that security guard.

Authorities said the suspect fired 16 rounds in one minute and was armed with a revolver and reloaded at one point. He opened fire at four locations within a block and was arrested shortly after the shooting.

Dyer said Muhammad had been living on the streets and most people had “disassociated” themselves from him.

A former classmate of Muhammad said that when they met he was outgoing, down to earth, peaceful and into health and nutrition.

Desiree Martinez says she met him three years ago when both were in a media training program at Community Media Access Collaborative in Fresno.

Martinez says everybody loved him and that whenever he saw someone eating junk food, he would talk to them about making healthier food choices.

She says she was shocked to hear that he was connected to Tuesday’s shootings.

The scene of a deadly shooting in Fresno, Calif., on Tue., April 18, 2017. KGPE-TV

Shot Spotter detected the first gunshots around 10:45 a.m., according to KGPE. The suspect shot into a Pacific Gas & Energy vehicle, killing the 34-year-old passenger, the station reported, and Muhammad continued walking and opened fire at a local resident but missed.

The driver of the truck, who is Latino, sped off to the police department for help, but the worker, a white man, died.

Police at the scene of one of the shootings where suspect Kori Ali Muhammad, 39, killed the passenger inside a Pacific Gas & Energy truck on Tue., April 18, 2017. KGPE-TV

The utility company said in a statement that it’s cooperating with law enforcement:

Our hearts are very heavy today, as we have lost a member of our PG&E family. Our thoughts and prayers are with the family of our employee, and all those impacted by this tragic event. Public and employee safety is always our top priority. While we focus on safety every day, no training or protective equipment can prepare one for events outside of one’s control. We are cooperating with law enforcement authorities as they investigate the incident. This loss is particularly difficult for our employees who live and work in the Fresno area. We are sending additional resources to support our employees in the Central Valley.

This undated photo provided by the Fresno Police Department shows Kori Ali Muhammad, 39, who was arrested shortly after a shooting rampage outside a Catholic Charities building, in Fresno, Calif., on Tue., April 18, 2017.

KGPE reported the suspect approached a 58-year-old resident and shot and killed that person.

Ashlee Wolf of Catholic Charities told the Fresno Bee newspaper that the final shooting took place at a bus stop near the charity.

Wolf said the charity doesn’t believe the shooter was tied to Catholic Charities. She says the charity is working with police to provide information.

Police say two of the victims may have been clients of Catholic Charities, which provides a variety of services for refugees, the homeless and those for disabilities.

Sayed Ali Ghazvini, imam of the Islamic Cultural Center of Fresno, said Muhammad was not a member of his congregation and he did not recognize him. The imam said he is consulting with other faith leaders.

“We’re kind of shocked and surprised for what happened,” Ghazvini said. “We are very sorry for this to happen. We offer condolences for the victims, we pray for the victims and their families.”

Public records list Muhammad as Cory Taylor and other aliases with addresses in Fresno and Sacramento. A woman who identified herself as Taylor’s grandmother said Tuesday that the family last saw him on Easter Sunday. She hung up the phone before giving her name.

Authorities spotted Muhammad running and took him into custody. Police are looking for the revolver but believe someone may have picked it up.

Muhammad told officers at his arrest that he was the guy they were looking for, Dyer said.

“I did it. I shot them,” Dyer said Muhammad told officers.

Following the shooting, Fresno city spokesman Mark Standriff said county offices were placed on lockdown and people were urged to shelter in place.

Police have called the FBI to assist in the investigation.

Muhammad was charged in 2005 with possessing cocaine with intent to distribute, court records show. Federal prosecutors said at the time that he was also in possession of a 9mm semi-automatic handgun and two rifles after being convicted of a felony.

He claimed insanity, and his attorney requested a psychiatric examination for his client, saying Muhammad “appeared eccentric with some bizarre beliefs.” A psychiatrist who examined Muhammad believed he had psychosis, Muhammad’s attorney said in the court filing.

He also “suffered auditory hallucinations and had at least two prior mental health hospitalizations,” according to court documents. His attorney said that Muhammad had “paranoia” and thought the justice system and his defense attorney were conspiring against him, court papers said.

The attorney who represented Muhammad in that case did not return a call for comment Tuesday.

Fresno Mayor Lee Brand issued a statement Tuesday evening:

This is a sad day for us all. My thoughts and prayers are with the families of the victims. None of us can imagine what they must be going through. I am grateful for the quick and decisive response of our Police Department in preventing further senseless violence.