WASHINGTON (AP) - The Supreme Court took two cracks at one of the law's thorniest questions Monday: When can you lock up a prisoner and throw away the key?
Not when it's a teenager who hasn't killed anyone, the justices said. But when it's a "sexually dangerous" inmate, maybe so, even if he has completed his federal prison sentence.
By a 5-4 vote, the court said young people serving life prison terms must have "a meaningful opportunity to obtain release" if they haven't killed their victims. The majority opinion by Justice Anthony Kennedy extended the "children are different" rationale that drove his decision five years ago that outlawed the death penalty for killers under 18.
The court ruled in the case of Terrance Graham, who was implicated in armed robberies when he was 16 and 17. Graham, now 23, is in prison in Florida, which holds 60 percent of juvenile defendants who are locked up for life for crimes other than homicide.
"The state has denied him any chance to later demonstrate that he is fit to rejoin society based solely on a non-homicide crime that he committed while he was a child in the eyes of the law," Justice Anthony Kennedy wrote in his majority opinion. "This the Eighth Amendment does not permit."
In a second case, the court voted 7-2 to uphold a federal law that allows for the indefinite imprisonment of inmates considered mentally ill and "sexually dangerous," no matter that their sentences have been served.
Solicitor General Elena Kagan successfully argued the government's case in front of the Supreme Court in January. Kagan has now been nominated to replace the retiring Justice John Paul Stevens.
Kagan compared the government's power to commit sexual predators to its power to quarantine a federal inmate whose sentence has expired but who has a highly contagious and deadly disease.
The decision is in keeping with previous high court cases that have upheld state civil commitment laws for sexual predators. States hold the vast majority of sex offenders who are in prison.
In both cases, the court's liberal justices held sway and Justices Antonin Scalia and Clarence Thomas were in dissent.
Life sentences with no chance of parole are rare for juveniles tried as adults and convicted of crimes less serious than killing, although roughly three dozen states allow for the possibility of such prison terms. Kennedy said 129 inmates in the United States are serving such terms.
Those inmates are in Florida, the federal system and ten other states - California, Delaware, Iowa, Louisiana, Mississippi, Nebraska, Nevada, Oklahoma, South Carolina and Virginia - according to a Florida State University study that the court supplemented with independent research. More than 2,000 other juveniles are serving life without parole for killing someone. Their sentences are not affected by Monday's decision.
Justice Thomas criticized the majority for imposing "its own sense of morality and retributive justice" on state lawmakers and voters who chose to give state judges the option of life-without-parole sentences. Justice Samuel Alito also dissented, and Chief Justice John Roberts, while siding with Graham in the Florida case, opposed applying the court's ruling to all young offenders who are locked up for crimes other than murder.
Said Thomas: "I am unwilling to assume that we, as members of this court, are any more capable of making such moral judgments than our fellow citizens."
Kennedy said the high court ruling does not ensure anyone's release. "What the state must do, however, is give defendants like Graham some meaningful opportunity to obtain release based on demonstrated maturity and rehabilitation," Kennedy said.
Kennedy wrote the Supreme Court opinion in 2005 that ruled out the death penalty for people under 18, judging them less responsible than adults.
Monday's decision is an extension of the rationale he used then.
An expert in sentencing law suggested the outcome could produce difficulties for judges and lawyers in cases of young offenders.
For example, are extremely long sentences of 35 years to 40 years that offer no chance at parole before release constitutional?
The court's "ruling likely will produce challenges for lawyers and lower courts to determine just whether and when other extreme prison terms are constitutionally problematic," said Ohio State University law professor Douglas Berman.
In November, the justices heard argument in two juvenile-sentencing cases. The other involved Joe Sullivan, also of Florida, who was sent away for life for raping an elderly woman when he was 13. The court did not issue an opinion in Sullivan's case, but he will benefit from the Graham ruling.
In Monday's sex offender case, the court said the federal civil commitment law is appropriate for maintaining "the security of those who are not imprisoned but who may be affected by the federal imprisonment of others."
Lower federal courts held that Congress overstepped its authority when it enacted a law allowing the government to hold indefinitely people who are considered "sexually dangerous."
But "we conclude that the Constitution grants Congress legislative power sufficient to enact" this law, Justice Stephen Breyer said in his majority opinion.
The law has been invoked for roughly 100 federal prisoners. Authorities must persuade a federal judge that continued imprisonment is necessary and also must try to transfer prisoners to state control.
The challenged provision was part of the Adam Walsh Child Protection and Safety Act that President George W. Bush signed in 2006.
The act, named after the son of "America's Most Wanted" television host John Walsh, was challenged by four men who served prison terms ranging from three to eight years for possession of child pornography or sexual abuse of a minor. Their confinement was supposed to end more than two years ago, but prison officials said there would be a risk of sexually violent conduct or child molestation if they were released.
A fifth man who also was part of the legal challenge was charged with child sex abuse but declared incompetent to stand trial.
In four opinions overall, the justices appeared more concerned about what the case says about federal versus state power than the imprisonment of sex offenders. That could be a harbinger of the arguments over health care reform and other aspects of President Barack Obama's agenda that could come before the court in the next few years.