A gunman who shot dead four men had set out to kill as many white people as he could, police in California have said.
Kori Ali Muhammad, 39, was arrested shortly after his Tuesday morning rampage on the streets of Fresno that left three white men dead and shots were fired at a fourth.
Muhammad - who is black - was wanted by police for the fatal shooting of white security guard, 25-year-old Carl Williams, last week.
Muhammad fired 16 rounds in less than two minutes at four places within a block, shooting men who simply appeared to be going about their daily business, police said.
Muhammad first walked up to a lorry and shot a man sitting in the passenger seat.
The driver, who is Latino, sped off to the police station for help, but the shot worker, a 34-year-old white man, died.
Muhammad then shot at another person and missed, police said.
The gunman then aimed at a third, killing the 37-year-old on the pavement as he walked with a bag of shopping.
The final victim, 58, was shot dead in the car park of a charity building.
Fresco police chief Jerry Dyer said Muhammad approached a vehicle in between the shootings, but he spared the lives of two women who were in the car with a child. The women were Latinas, he said.
When he was arrested, Muhammad shouted "Allahu Akbar" - God is great - but Mr Dyer said the shootings had "nothing to do with terrorism in spite of the statement he made", and were instead "solely based on race".
"These individuals who were chosen today did not do anything to deserve what they got," Mr Dyer continued.
"These were unprovoked attacks by an individual that was intent on carrying out homicides today. He did that."
During the arrest Muhammad told police: "I did it. I shot them."
Hours before the shootings, police put out a news release saying that Muhammad was armed and dangerous, and was wanted over the shooting death of Mr Williams on April 13.
Mr Dyer said Muhammad "had seen the news release and as a result he made a decision to himself that he was not going to go to jail for shooting a security guard, that he was going to kill as many people as he could today and that's what he set out to do".
Police say two of the victims may have been using Catholic Charities, which provides services for refugees, the homeless and those with disabilities.
Police are searching for the gun Muhammad said he threw into a pile of clothing.
Muhammad faces four counts of murder and at least two additional charges of assault with a deadly weapon.