If Ethan Crumbley had been a few years older when he killed four students at his Michigan high school and pleaded guilty to first-degree murder, there would be no question: He would be going to prison for the rest of his life.

But because he was 15 when he opened fire in 2021 in the hallways of Oxford High School, his fate is less certain.

In a hearing set to begin on Thursday morning, a state judge will consider whether Mr. Crumbley should be eligible for a sentence that could allow him to one day leave prison. Though most adults convicted of first-degree murder in Michigan must be sentenced to life in prison without parole, the most serious penalty available under state law, a U.S. Supreme Court ruling from 2012 requires judges to consider giving juvenile defendants like Mr. Crumbley a chance for eventual release.

The hearing, which is expected to stretch into Friday and possibly next week, could provide the fullest airing yet of the evidence in a mass killing that renewed long-festering questions about gun control, school safety and parental responsibility. And it could offer a preview of prosecutors’ separate cases against Mr. Crumbley’s parents, who are charged with involuntary manslaughter and accused of missing chances to intervene before the shooting. The parents have pleaded not guilty and are awaiting trial.

The proceeding this week, known as a Miller hearing, will require Judge Kwamé Rowe to consider a number of factors, including the role that Mr. Crumbley’s age, family and home environment might have played in the crime, as well as the possibility that he might eventually be rehabilitated. Prosecutors have argued that Mr. Crumbley should never be eligible for release despite the limits imposed by the Supreme Court in the 2012 case, Miller v. Alabama.

Prosecutors said in a court filing that the gunman had a “plan and desire to commit violent, disturbing acts for his own pleasure and feeling of power.” They also said Mr. Crumbley, now 17, had misbehaved in jail, calling “into question whether this defendant can ever be rehabilitated.”

Mr. Crumbley pleaded guilty last year to murder, attempted murder and terrorism in the shooting at his school, about 45 miles north of downtown Detroit. He killed four students — Madisyn Baldwin, 17; Tate Myre, 16; Justin Shilling, 17; and Hana St. Juliana, 14 — and injured several others. The gunman said in court last year that he had asked his father to buy the 9-millimeter handgun used in the killings, and that it had been left unlocked in the home.

Mr. Crumbley’s lawyers have sought, without much success, to limit evidence and testimony at this week’s hearing. They have also described their client as a troubled teenager whose difficult upbringing makes him exactly the sort of young person who should have a chance to leave prison.

“Life without the possibility of parole is not a proportionate sentence for a 15-year-old boy with an abhorrent family life who struggled with untreated mental illness,” the lawyers wrote in a court filing.

The Supreme Court’s decision 11 years ago came as part of a broader rethinking of how juvenile defendants are prosecuted and punished, especially as research has shown significant differences in the development and rehabilitation potential of juvenile criminals compared with adults. The court had previously banned the death penalty for crimes committed by minors.

“When it comes to juveniles, there really isn’t a good match between how serious the actual incident offense is and the likelihood that they’re going to reoffend,” said Dr. Jennifer Piel, a psychiatrist and the director of the Center for Mental Health, Policy and the Law at the University of Washington. “And I think that the Supreme Court in Miller had some appreciation of that.”

In the years since the Miller decision, some states have removed life in prison without parole as a possible punishment for minors. Others, like Michigan, have kept it as an option.

Judge Rowe, of the Oakland County Circuit Court, is not expected to rule immediately on whether Mr. Crumbley can be sentenced to life without parole. And whatever he decides on that question, there will be a separate sentencing hearing, during which victims will have a chance to speak.

Outside the courtroom, the killings at Oxford High have remained a source of pain and anger across Michigan. When state legislators passed several new gun restrictions this year, including one law setting additional requirements for gun storage, they referred to the 2021 shooting.