The Supreme Court on Thursday issued a ruling that limits the reach of a federal law barring gun ownership by drug users, carving out an exception for casual marijuana use while leaving intact restrictions on those addicted or presently intoxicated. The unanimous decision, authored by Justice Neil M. Gorsuch, found that the government had applied the Gun Control Act of 1968 too broadly by conflating recreational drug users with individuals who pose a danger to public safety due to addiction.

The case, U.S. v. Hemani, involved Ali Hemani, a Texas man charged after federal agents discovered a handgun and marijuana during a 2022 search of his home. Hemani, who reported regular marijuana use but was not accused of drug addiction, challenged the constitutionality of the law’s prohibition on firearm possession by “unlawful users” of controlled substances. The statute, originally enacted in the wake of the 1960s assassinations of Robert F. Kennedy and Martin Luther King Jr. and amended in the 1980s, forbids gun ownership by anyone who is an unlawful user or addicted to drugs.

Justice Gorsuch emphasized that the court’s ruling is narrow, applying only to casual or recreational drug users and not addressing bans on individuals addicted to drugs or currently intoxicated. He noted the decision does not preclude Congress from enacting laws aimed at users of particular substances if sufficient risk to firearm misuse is demonstrated. Gorsuch also rejected the government’s analogy between modern drug users and historical laws barring habitual drunkards from gun ownership as legally unpersuasive.

The ruling followed the framework established in a 2022 landmark Second Amendment decision that requires analyzing gun regulations by examining the nation’s historical traditions. Several justices wrote concurring opinions to elaborate on their reasoning. Notably, Justice Samuel A. Alito Jr., typically aligned with conservative views, joined Justice Elena Kagan, a liberal member of the court, to highlight that marijuana’s widespread and increasingly lawful use today differs significantly from historical treatments of habitual intoxication.

The case attracted attention partly because the law at issue had been used to convict Hunter Biden, son of President Joseph R. Biden Jr., on similar charges involving drug use and gun possession. President Biden pardoned his son shortly before leaving office. The court clarified its ruling did not extend to the statutory provisions implicated in that case.

The legal challenge also drew unusual alliances. The Trump administration, alongside gun safety advocates including Everytown for Gun Safety, supported maintaining the law. Conversely, organizations backing Hemani included the National Rifle Association, the American Civil Liberties Union, and groups advocating for civil rights and drug policy reform.

Following the decision, Cecillia Wang, legal director of the ACLU, described the ruling as an important protection for millions of Americans, noting that nearly half report marijuana use at some point in their lives. The ruling signifies a more restrained application of gun laws relating to controlled substances, requiring a clearer distinction between casual users and individuals whose drug use genuinely threatens public safety.