SAN DIEGO — A man who has been arrested and released 12 times for a range of drug and gun conduct in two years was sentenced to seven years in prison after pleading guilty to a number of felony counts, local officials announced Tuesday.

Craig Blas, 32, pleaded guilty on May 23 to possession of fentanyl for sale with an allegation of being personally armed with a firearm, possession of methamphetamine for sale with an allegation of being personally armed with a firearm, possession of a firearm by possessor of controlled substance, possession of a firearm by a felon, person prohibited from owning or possessing ammunition and resisting an officer, San Diego County District Attorney Summer Stephan stated in a press release Tuesday.

Stephan says recent law changes, including Propositions 47 and 57, have caused certain crimes to reduce from felonies to misdemeanors, which has resulted in some defendants serving less time in custody than they would have otherwise served.

“The time has run out on this habitual criminal who took advantage of weakened laws and emergency orders to continue to commit crimes and harm his community,” Stephan said. “That is why he stands convicted of every charge and the Judge is appropriately sentencing him to prison. We need to continue to fight against the loopholes and deficiencies in the law that are being used by repeat offenders to their own advantage.”

The day of Blas’ latest arrest was May 7 when Escondido police officers recognized him while on patrol, the county attorney’s office said. Officers were able to apprehend him as he attempted to run from authorities.

Police discovered a 9mm magazine sticking out of his back pocket, three fentanyl pills, a pistol red dot optic aiming device, and $736 cash, according to Stephan. A fanny pack containing a loaded ghost gun, 36 grams of methamphetamine, and 235 M30 fentanyl pills were also found when officers noticed Blas throwing the item in the driver’s seat of the car. Also inside the car, a loaded 9mm magazine with eight 9 mm rounds were on the floorboard next to the gun while drug paraphernalia and another 3.6 grams of fentanyl were found in the trunk.