LOS ANGELES (CBSLA) – A former Los Angeles police officer who was fired for his alleged involvement in the department’s cadet scandal was sentenced to two years in jail Friday for unrelated weapons charges out of San Bernardino County.

Robert Cain was sentenced to two years in county jail and four years of supervised release following his no contest plea in a San Bernardino County courtroom to one felony count each of manufacturing of an assault weapon and possession of multi-burst trigger device or “bump stock,” according to his attorney, Bill Seki.

READ MORE: Man In His Mid 30s Fatally Shot In Carson

Eight other weapons-related charges were dismissed as a result of the 31-year-old former officer’s plea.

The judge authorized Cain to be taken to L.A. County in connection with his pending case on sex charges and ruled that his sentence could be served at any penal institution in California.

In June of last year, seven cadets were arrested for their alleged involvement in stealing LAPD squad cars, which culminated in two high speed chases and crashes. The cadets are believed to have pulled people over while impersonating officers, and also are suspected of stealing LAPD equipment, including tasers, radios and a bulletproof vest.

MORE: LAPD Cadet Scandal

The investigation into the cadet scandal led authorities to Cain, a 10-year LAPD veteran, who is accused of having a sexual relationship with one of the arrested cadets, a 15-year-old girl.

READ MORE: 2 Riverside Co. Sheriff's Deputies Recovering After Being Hit By Delivery Van; 2 Pedestrians Killed

Chief Charlie Beck personally arrested Cain on June 22. Cain was charged in L.A. Superior Court with two counts each of oral copulation of a person under 16, lewd acts upon a child and unlawful sexual intercourse.

The LAPD searched Cain’s Rancho Cucamonga home and found more than 100 weapons, police said, some of which are not legal to own in California.

Cain resigned from the force following his arrest.

If convicted as charged in the L.A. County case, he could face up to seven years and eight months in state prison, according to the L.A. County District Attorney Office.

Meanwhile, the 64-year-old Beck — who fiercely defended the cadet program following the scandal — announced Friday that he will retire in June. He has served as chief since 2009, and has been with the department for 40 years.

MORE NEWS: Due To Wind Concerns, Disneyland Vaccine Site To Be Closed Sunday

(©2018 CBS Local Media, a division of CBS Radio Inc. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed. Wire services contributed to this report.)