SACRAMENTO (AP) — California is continuing a years-long easing of criminal penalties even as it increases public scrutiny of law enforcement.

In his final action on legislation before leaving office in January, Gov. Jerry Brown this weekend stuck with his long-term goal of reducing mass incarceration, rehabilitating juvenile offenders, trimming lengthy prison sentences and offering second chances to the criminally convicted.

One new law will automatically erase or reduce marijuana-related convictions now that the drug is legal recreationally.

Brown signed a bill redefining the state’s felony murder rule that held accomplices to the same standard as if they had personally killed someone. Prosecutors warned that hundreds of people can seek resentencing, sometimes forcing near re-trials of cases that may be decades old or the product of plea bargains.

“California’s murder statute irrationally treated people who did not commit murder the same as those who did,” Democratic Sen. Nancy Skinner of Berkeley, the bill’s author, said in a statement. California is now “reserving the harshest punishment to those who directly participate in the death.”

Brown also barred 14- and 15-year-olds from being tried as adults.

“We’re concerned about public safety and about the rights of victims in these cases,” said Jennifer Jacobs, a spokeswoman for the California District Attorneys Association, which opposed both laws. “These are people with violent criminal pasts who will be allowed out of jail.”

Other bills in a package by Los Angeles-area Democratic Sens. Ricardo Lara and Holly Mitchell remove those 11 and younger from juvenile court jurisdiction entirely unless they are accused of murder or certain violent sex crimes, and another gives judges discretion over whether to impose what were mandatory five-year additional prison sentences for repeat serious offenders.

The bills “make rehabilitation and community recovery the focus of our criminal justice system,” said Lara. “Thirty years of harsh sentencing laws resulted in overcrowded prisons without improving public safety.”

Brown has long acted to help reverse some of the tougher criminal penalties, including those adopted when he was first governor in the 1970s and 1980s. He most recently promoted a 2016 ballot measure allowing earlier parole for thousands of inmates while keeping more juveniles out of the adult system.

“There is a fundamental principle at stake here: whether we want a society which at least attempts to reform the youngest offenders before consigning them to adult prisons where their likelihood of becoming a lifelong criminal is so much higher,” Brown wrote in signing one of the bills.

Other new laws allow prosecutors to ask judges to shorten prison sentences and extend an existing law that allows nonviolent offenders between 18 and 21 to serve sentences in juvenile facilities and eventually have their charges dismissed.

He also made it easier for about 220,000 Californians to erase old marijuana convictions that already were eligible to be stricken since California eased drug laws and approved recreational cannabis. The new law requires state officials to find pot convictions that can be removed or reduced and allows judges to remove them automatically unless prosecutors object.

The measure will create “a simpler pathway for Californians to turn the page and make a fresh start,” said the law’s author, Democratic Assemblyman Rob Bonta of Alameda.

Brown also rolled back a law he approved earlier this summer that vastly expanded the number of criminal suspects who can be diverted to mental health treatment programs and have their charges dismissed. The revision excludes those charged with murder, rape and other sex crimes, among other changes.

He approved two laws responding to nationwide concern over the killings of civilians — primarily young black men — by police.

One opens a California law considered among the nation’s most secretive in protecting investigations of police. It allows public access to internal investigations when police officers use force causing death or serious injury, commit sexual assaults on the job, or are dishonest in their official duties. The other requires law enforcement agencies to release audio or video recordings of serious use of force within 45 days unless the release would interfere with an investigation.

Peter Bibring, director of policing practices for the American Civil Liberties Union of California, said the bills will “help address the current crisis in policing.”

Peace Officers Research Association of California president Brian Marvel called the investigation disclosure law “reckless” and overbroad. He said the video release law could imperil witnesses to crimes.