SALEM, Ore. (AP) — Oregon narrowly approved expansive changes to the way it sentences juvenile offenders in what’s a reversal of tough-on-crime policy passed by voters a quarter of a century ago.

House lawmakers just barely pushed the measure late Thursday night through the chamber and onto the governor’s desk, Oregon Public Broadcasting reports . Among other things, it ensures young offenders aren’t sentenced to life without parole and establishes pathways for early release and rehabilitation.

“For those in our system who can be redeemed, we should be focusing on the hope of the future, not the mistakes of the past,” said Rep. Marty Wilde, a Democrat from Eugene and former deputy district attorney. “There is no justice in treating children as small adults and locking them away without a chance to rehabilitate.”

The proposal partially eases rules voters approved in 1994’s Ballot Measure 11, which set mandatory minimum sentences for serious crimes. The move was part of a local and national efforts to be “tough on crime,” policy that critics later denounced for disproportionately targeting minorities.

“Our juvenile system creates a class of people who reoffend at a higher rate,” said Rep. Jennifer Williamson, a Democrat from Portland who had been a central backer of the sentencing changes. “It targets our communities of color. My question is, ‘What is our responsibility knowing that?'”

Those 15 and older convicted of serious crimes like murder, rape and kidnapping will no longer be automatically be tried as adults under the change. Judges will instead try youths as they see fit, something some opponents say gave judges broad decision-making authority.

The bill also makes young offenders eligible for a parole hearing after serving half their sentence and creates a new pathway for certain defendants to secure early release.

Some argued the changes should be sent back to the voters, since they were the ones to enact those sentencing minimums in the first place.

“There is no doubt that Oregon needs to reform the juvenile justice system,” said Rep. Ron Noble, a Republican from McMinnville, “but this bill needs to go to the voters.”

Gov. Kate Brown has signaled she will sign the measure into law.