The Supreme Court's landmark ruling Monday barring mandatory life sentences for teenage criminals offers the welcome glimmer of hope for parole for thousands of lifers across the nation.

In Pennsylvania prisons nearly bursting with inmates who were locked away as teens, the mandatory-term ruling poses a major challenge in righting a potential wholesale injustice.

No other state has thrown away the key on so many juvenile offenders — with around 480 serving life terms for crimes committed before age 18. The Pennsylvania Supreme Court has been asked to order the review of hundreds of those cases, and the court has a duty to move decisively in that direction now.

Every sentence should be reviewed as a result of the high court ruling, even if the state courts eventually conclude that the life sentences should stand under the narrow discretion the Supreme Court allowed.

The ruling represented the court's much-anticipated expansion of its view that young offenders deserve a second chance. A narrow majority of liberal justices, joined by the swing vote of Anthony M. Kennedy, stood up for compassion once again in this case.

While that prompted the court's four most conservative justices to dissent — some almost angrily — the ruling was grounded not in emotion, but in good science.

Just as with the court's earlier ban on executing teen killers, the underpinning of the life-term ruling is the widely held view that the brains of teenage offenders are not fully developed.

As such, these youths have less capacity to grasp the outcome of their actions, and peer pressure can lure them more easily into crime.

That's why the juvenile-justice system, for most crimes, leans heavily toward trying to rehabilitate young offenders. With murder, though, that sound concept has been shunted aside in recent decades as more and more teenagers were tried as adults and subject to mandatory sentences enacted by tough-on-crime legislatures.

Yet, if the courts are supposed to dispense justice, they cannot continue to ignore the fact that, as Justice Elena Kagan wrote for the majority, teenage offenders are influenced by "immaturity, impetuosity, and failure to appreciate risks and consequences."

Rights groups say that few nations pursue throw-away-the-key policies with young people. That the United States does shows the high court is on the right track.

Better still, had the 5-4 majority banned all life sentences for youths. But as Kennedy suggested when the case was argued in April, the ruling allows for the possibility that in specific cases, judges could impose life-without-parole sentences.

That's a troubling concession, since it means teenagers found guilty of the most heinous crimes — though just as driven by their immaturity — will likely be locked away for life by judges afraid of criticism.

Despite that, it's a turning point for the court to uphold the hope that many more young offenders, someday, can be seen as having paid their dues to society.