This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

A man convicted of killing four white men in 2017 in a race-related rampage in Fresno was sentenced Friday to life in prison without the possibility of parole, prosecutors said.

Kori Ali Muhammad’s sentence comes three years after he said he was fed up with racism against black people and shot several people, killing four white men.

He was convicted by a Fresno County jury in April of first-degree murder, second-degree murder, attempted murder and other crimes, the Fresno County district attorney’s office said.

He withdrew a previous plea of not guilty by reason of insanity, and prosecutors said they wouldn’t seek the death penalty.

Muhammad, a black man whose defense said he was mentally ill, was accused of a series of shooting attacks on white men in April 2017 in Fresno.

In a recorded confession to investigators that was played at his trial, Muhammad said he shot Motel 6 security guard Carl Williams III and tried to kill another guard on April 13 because he felt he had been disrespected when he went to visit a friend.

A security camera recording showed Muhammad coming up behind Williams, 25, and shooting him.

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

While on the run after the shooting, Muhammad learned that he was wanted for Williams’ killing. On the recording, Muhammad said that if he was “going down for murder” the best thing was to “kill as many white men” as he could.

On April 18, 2017, Muhammad drove through downtown shooting at white men, he said. He surrendered to police after, at one point, firing nearly 20 shots in less than a minute, authorities said.

Zachary Randalls, 34, was shot in a Pacific Gas & Electric truck.

“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.”

He also was convicted of killing Mark Gassett, 37, and David Jackson, 58, and trying to shoot three other men.

Muhammad was convicted of first-degree murder for Jackson’s slaying; second-degree murder for Williams, Randalls and Gassett; four counts of attempted murder; one count of shooting at an occupied vehicle; and one count of being a felon in possession of a firearm.