The driver of the truck, who was not injured, drove the victim to the Fresno Police Department's headquarters in downtown Fresno and alerted officers. The victim, identified as a 34-year-old PG&E employee who was the father of two young children, succumbed to his injuries.

Authorities said Muhamad walked westbound and encountered another man and opened fire on him. Officials said the shots missed.

He then walked to Fulton Street where he came across a 37-year-old man and opened fire, killing him, according to police.

Muhamad continued walking to Catholic Charities where he encountered a 58-year-old man in the parking lot and killed him, authorities said.

In all, Dyer said 16 shots were fired within one minute at four different locations. At one point, Muhamad reloaded his revolver using speedloaders, which allows the user to fill the gun with ammunition faster, officials said.

Officers were able to find Muhamad and take him into custody without further incident. While Muhamad was being arrested, Dyer said he yelled out, "Allahu Akbar," which means "God is great" in Arabic.

Muhamad admitted to the shootings, even apologizing to Dyer, according to officials. Dyer said Muhamad had been "living on the streets" at least the last few days.

Authorities take 39-year-old Kori Ali Muhammad, the man suspected of randomly shooting and killing three men in Fresno on Tuesday, April 18, 2017.

Muhamad was wanted in connection with the shooting death of an unarmed security guard at a Motel 6 that occurred Thursday evening, according to police. The victim in that shooting was identified as 26-year-old Carl Williams.

Dyer said Muhamad realized Tuesday morning that he was wanted in connection with the shooting death of Williams and that sparked the shooting rampage.

Muhamad, who police said has a criminal history, had previously posted to Facebook that he didn't like white people and expressed several anti-government sentiments, Dyer said.

"We looked at his Facebook and we know that he had some posts that said he does not like white people and also on that post that he has expressed some anti-government sentiments," Dyer said.

All the victims, who were randomly targeted, were white, according to police.

"What motivated these crimes today was hatred," Dyer said.

Federal authorities including the FBI have been notified and were assisting the Fresno Police Department in its investigation.

While Muhamad was in custody, Dyer said the gun had not been recovered, though the suspect had .357 caliber ammunition on him. Dyer said it was the same type of ammunition used in the murder of Williams at the Motel 6.

Muhamad was booked on four counts of murder among other crimes including assault with a deadly weapon.

Dyer said investigators weren't aware of any other shooting or homicides in Fresno connected to Muhamad at this time.