A California man accused of killing four people told police that he was just trying to “kill as many white men” as he could, jurors in his case heard Monday.

Kori Ali Muhammad is charged with the 2017 killing of four men, the Fresno Bee reported.

During his trial on Monday, prosecutors played a recording of Muhammad’s confession to police.

“I didn’t want to do nothing to law enforcement so I just found some white men to kill,” Muhammad said in the video.

Muhammad, whose defense attorneys say he suffers from schizophrenia, told a detective he was upset with racism against blacks in the United States.

MORE: Bernie Sanders Says the Soviet Union Wasn’t Real Socialism

“It starts taking its toll on you and you get fed up with the racism,” he said. “You get tired of letting things slide.”

Muhammad’s alleged killing spree began April 13, 2017, at a Motel 6 in Fresno. While there visiting a friend who was a guest, he claims a security guard, 25-year-old Carl Williams III, harassed and was disrespectful to him.

Williams had reported Muhammad to the venue’s manager.

When asked by the manager to register at the office and pay a nominal visitor’s fee, Muhammad and his friend began to argue. Muhammad eventually went to the office to register, but the manager said he felt threatened and threw both Muhammad and his friend out.

A security surveillance video shows Muhammad walking around behind Williams, who was talking to Muhammad’s friend.

Muhammad pulled a gun from his waist, turned and shot Williams, surveillance video showed.

He then left the hotel and told authorities he considered fleeing to Los Angeles or San Diego.

After learning five days later that he was wanted for Williams’ killing, Muhammad determined it was just a matter of time before he was caught.

He told detectives he figured that since he was already “going down for murder,” he might as well “kill as many white men” as possible.

His first target was 34-year-old Zackary Randalls, who was sitting with a co-worker in a Pacific Gas & Electric truck. Muhammad shot him with his .357 Colt Python pistol.

“When I walked up to the truck, I saw a Mexican driver and a white guy,” Muhammad said. “I didn’t want to target the driver because he was Mexican, so I shot the white dude.”

MORE: Kim Foxx Says New Jussie Smollett Charges Are ‘Bullsh*t’ — Hate Crime Hoax Was a ‘Prank’

Muhammad said he targeted a PG&E truck because his father worked for the company until his addiction to crack cocaine ruined his life. Muhammad blamed the U.S. government for purportedly allowing crack cocaine to spread. He said he was enraged by the sight of the PG&E truck.

Muhammad then killed two other men in Fresno’s downtown area: Mark Gassett, 37, and David Jackson, 58.

Crimes motivated by racial animus

In September of last year, a Kansas City man was convicted of killing his own 18-year-old daughter.

“He blamed racism and what he viewed as slavery in modern America as forming him into what he was,” a release from the prosecutor’s office in the case said.

Last month, a Michigan man kidnapped a woman and forced her to watch a TV miniseries about slavery “so she could better understand her racism.”