HUNTINGTON BEACH (CBSLA) — A San Andreas man will spend four years in prison after the May 2020 poisoning of eight people experiencing homelessness in Huntington Beach.

The victims had “seizure-like symptoms, difficulty breathing, vomiting,” and intense pain, Orange County officials said.

Several of them had to be hospitalized, according to the District Attorney’s Office.

William Robert Cable admitted to the crimes and pleaded guilty, according to court records obtained Friday.

Prosecutors said some of the victims were told they were participating in a “spicy food challenge” when they were fed food laced with oleoresin capsicum, a substance that prosecutors said is twice as strong as pepper spray. Their reactions were filmed.

If he was convicted at trial, Cable could have faced up to 19 years and three months in prison.

(© Copyright 2021 CBS Broadcasting Inc. All Rights Reserved. City News Service contributed to this report.)