WASHINGTON — Supreme Court justices appeared troubled Tuesday by mandatory life sentences without parole imposed on murderers who are 14 or younger.

There are 79 prisoners who were 14 or younger when they were given life terms with no parole for their part in a murder. To the apparent surprise of the justices, most of them were condemned to die in prison without a judge or jury weighing whether they deserved a more lenient sentence because of their youth.

The justices sounded closely split and uncertain over whether to set new constitutional limits on the prison terms for these young murderers. They could, for example, rule it cruel and unusual punishment to give a 14-year-old a life term with no chance for parole. They could go further and limit life terms for anyone under 18, which could affect 2,300 prisoners nationwide.

But on Tuesday, Justice Anthony M. Kennedy and the court’s liberal justices said they were most troubled by the mandatory life terms given to very young criminals. Maybe such a long term could be justified in some cases, but it “cannot be mandatory,” Kennedy commented.

In many states, including Alabama and Arkansas, the law calls for murderers to be given either the death penalty or life in prison without parole. That includes juveniles charged as adults.

In 2005, however, the high court abolished the death penalty for teenage murderers under age 18, leaving them to face a mandatory punishment of life in prison with no parole.

Arkansas state attorney Kent Holt, defending the life sentence for 14-year-old Kuntrell Jackson, said, “Teenagers must know if they commit the worst crimes, they can get the worst punishment.” Jackson was standing nearby when another teenager shot and killed a store clerk.

Justice Stephen G. Breyer said he saw a “due process” problem of imposing a life term on a young teen without a hearing to consider whether his youth called for a more lenient punishment.

Justice Elena Kagan said that in death penalty cases, the court has required a sentencing hearing so jurors can hear about “mitigating factors” that weigh against the harshest punishment. It is strange, she said, that a young teen could be sent to prison for life without a similar hearing.