US police say three people have been killed and one wounded by a gunman in downtown Fresno, California, on Tuesday morning.
Suspected attacker Kori Ali Muhammad, 39, shouted "God is great" in Arabic as police tackled and then arrested him, local police chief Jerry Dyer said.
Mr Dyer told reporters the shooting spree on Tuesday morning was a "random act of violence".
The suspect was also wanted over the killing of an unarmed motel security guard on Thursday.
"There is every reason to believe he acted alone," Mr Dyer said, adding there was no evidence so far to suspect a terrorism motive.
All four gunshot victims on Tuesday were white men, the Sacramento Bee reported, and Mr Dyer said Mr Muhammad had displayed an anger against white people in Facebook posts.
"He does not like white people, and he has anti-government sentiments", the chief said, adding that the FBI had been alerted.
The shooting began around 10.45am Californian time near the headquarters for Catholic Charities, with 16 shots fired in less than a minute, authorities said.
Witnesses said they saw a man carrying a large handgun, who reloaded it several times between shots.
The gunman then fired at a utility vehicle belonging to Pacific Gas and Electric Company, killing the passenger.
Government offices including the Fresno County Courthouse were put into lockdown as a precaution.