Since 2005, the Supreme Court has moved aggressively to stop the government from punishing juveniles too severely, holding that certain penalties are unconstitutionally “cruel and unusual” as applied to minors. First, the court barred the death penalty for defendants who committed their crimes as juveniles; then the justices outlawed life in prison for minors who committed nonhomicidal crimes. More recently, the court has invalidated mandatory life-without-parole laws that automatically sentenced homicidal juveniles to die in prison. And the justices appear poised to invalidate life-without-parole for any crime committed by a minor.

Little wonder, then, that a Florida judge extended the Supreme Court’s logic on Friday to strike down the state’s mandatory minimums for minors law. Florida requires that any minor who “killed, intended to kill, or attempted to kill” be sentenced to at least 40 years in prison. Under the statute, judges have no discretion to lessen this sentence.

But as 13th Judicial Circuit Court Judge William Fuente explained in his decision, the Supreme Court’s decision in the 2012 case Miller v. Alabama would seem to forbid such a law. In Miller, the justices invalidated mandatory juvenile life-without-parole schemes, which forced minors to be sentenced to life in prison once convicted of certain crimes. The Eighth Amendment’s prohibition on “cruel and unusual punishments,” the court held, “forbids a sentencing scheme” for minors that prevents a judge from assessing whether the law’s mandatory penalty “proportionately punishes a juvenile offender.” Children “cannot be viewed simply as miniature adults,” the court elaborated, because their crimes may be a reflection of temporary youthful impetuosity rather than permanent adult incorrigibility.

Thus, minors are protected against mandatory punishments under the Constitution, and are instead guaranteed “individualized sentencing.” That requires judges to consider a defendant’s immaturity, recklessness, family, and “home environment.” When sentencing a juvenile, judges must also take into account “the circumstances of the homicide offense, including the extent of his participation in the conduct and the way familial and peer pressures may have affected him.”

Florida’s 40-year mandatory minimum, Fuente ruled, violates this principle, thereby violating the Eighth Amendment. Under the law, judges are not permitted to decide that a juvenile’s immaturity, brutal family, and neglectful home environment render him less culpable for attempted murder—and therefore deserving of a shorter sentence. Instead, the Legislature replaced the sensitive responsibilities of a sentencing judge with its own harsh, one-size-fits-all punishment. The resulting law “vitiates a court’s ability to craft a lesser sentence it deems appropriate,” Fuente wrote, thereby “preventing a sentencing court from exercising the full extent of judicial discretion that Miller requires.”

In 2014, Iowa’s supreme court interpreted Miller to reach the same conclusion, invalidating state laws that force minors to be sentenced to some specific term of imprisonment upon conviction of certain crimes. Fuente’s ruling is likely to embolden other courts that are eager to extend the Miller rule to its logical endpoint by striking down mandatory sentencing schemes for minors. That alone won’t solve America’s mass incarceration crisis. But it will bring the country more in line with an international community that has already decided that treating children like adults in the criminal justice system is cruel, wrong, and just plain perverse.