GARDEN GROVE (CBSLA) — A controversial law often criticized for allowing criminals to be released early from state prison apparently also kept a gang member who went on a killing and crime spree in Garden Grove from being put back behind bars.

Zachary Castaneda booking photo (Photo via Santa Ana PD)

READ MORE: Los Angeles Clippers Hold Off Lakers, 119-115

Authorities say Zachary Castaneda, 33, went on a rampage through Garden Grove Wednesday that left four people dead and two others wounded.

He was charged Friday by the Orange County district attorney’s office with four counts of murder, one count of attempted murder, three counts of second-degree robbery and one count each of aggravated mayhem, assault with a deadly weapon and first-degree burglary.

He is also charged with enhancements for multiple murders, murder during a robbery and three enhancements for committing additional crimes while out on bail. If convicted as charged, he could be eligible for the death penalty, prosecutors said.

At the last minute, authorities said Castaneda would be arraigned Friday afternoon from jail, not from inside a courtroom. It’s unclear why he was not being transported to court for the hearing. Castaneda is being held on $1.1 million bail.

AB 109 was passed in 2011 to reduce California’s prison population by allowing nonviolent and non-sex offender to be released early from state prisons and be supervised by local county probation officers. Castaneda had already spent two years in prison for drug possession and weapons charges from 2014 to 2016 and had been jailed 14 times previously for multiple probation violations.

At the time of the murder spree, Castaneda was out on bail on three separate O.C. cases, including a July 19 arrest which resulted in felony charges of carrying a dirk or dagger, misdemeanor drug possession and driving on a suspended license, the DA’s office said.

“This person should have been in prison, and not allowed to be in our community committing these violent acts,” Garden Grove Police chief Tom DaRé said. “As a police chief, I implore our policy makers to reevaluate their policies on criminal justice.”

READ MORE: Gaudreau, Tkachuk Lead Flames Over Ducks In Shootout

The California Department of Corrections says Castaneda was not released early from prison and had served his full term of four years. Garden Grove police say AB 109 kept Castaneda from going back to prison because prior to its passage, he would have been sent back to state prison for at least a year for violating parole. Instead, AB 109 allowed Castaneda to be on probation as part of Post-Release Community Supervision, serving short stints in county jail each of the 14 times he violated parole.

Castaneda’s alleged crime spree started Wednesday at about 4:10 p.m. with a burglary at an apartment in the 12100 block of Jentges Avenue. Less than 15 minutes later, before police could even respond to the burglary report, officers were called to an armed robbery at a bakery nearby in the 13000 block of Chapman Avenue. No one was hurt in either of these incidents, even though the suspect was reported to be armed with a knife and a gun.

Police say Castaneda returned to the apartment on Jentges just after 5 p.m. and stabbed the two victims of the earlier burglary when they confronted him. One of the men killed was 62-year-old Helmuth Hauprich, and police have not yet identified the 63-year-old man killed in the apartment.

Castaneda lived next door to that apartment, police said.

That scene was followed by an armed robbery at a check-cashing business on Harbor Boulevard, the stabbing of a 54-year-old woman at an insurance business near Harbor and Garden Grove boulevards, and the stabbing and slashing of 44-year-old man who was pumping gas at a Chevron station along Harbor, all within a half hour.

At about 6:15 p.m., 39-year-old Pasqual Rioja was stabbed to death outside a Subway sandwich shop on First Street in Santa Ana, just before Castaneda allegedly attacked 58-year-old Robert Ray Parker, a security guard visiting a 7-Eleven across the street. Parker also died.

Castaneda, who police say was armed with a knife and gun, was finally taken into custody outside the 7-Eleven.

MORE NEWS: La Mirada Home Decorated Like 'National Lampoon's Christmas Vacation' Could Face Fines Over Display

Police say Castaneda has not been cooperative, and his targets all appeared to be random.