U.S. Attorney Andrew Lelling reaffirmed his opposition to supervised drug consumption sites Thursday, doubling down on his promise to prosecute any such program a day after a federal judge ruled the facilities would not violate a section of the Controlled Substances Act.

His pledge comes as supporters of the idea in Massachusetts sense growing momentum in the wake of the case, arguing the ruling sets a legal precedent in favor of a controversial but vital way to limit the opioid epidemic's death toll.

Judge Gerald McHugh ruled Wednesday that a nonprofit's plans to open a supervised consumption site in Philadelphia do not run afoul of the so-called "crack house statute" as federal prosecutors had alleged in a civil suit.

Lelling, who has argued that allowing individuals to use pre-obtained illegal drugs without chance of arrest would violate federal law, said in a Thursday press release that he "respectfully disagrees" with the ruling and views it as "only the first step in a long process of judicial review for this important issue."

"As the Deputy Attorney General said yesterday, efforts to open injection facilities, including here in Massachusetts, will be met with federal enforcement," Lelling said.

The proposal is a charged one for Beacon Hill, where a handful of lawmakers have staunchly advocated in favor of supervised consumption — also referred to as safe injection — sites as a potential tool to prevent people from dying and get them into treatment.

A state commission tasked with studying ways to reduce harm from the epidemic recommended piloting one or more such sites, which already exist in Canada and some European countries. They would be particularly valuable, supporters say, as the synthetic opioid fentanyl grows more common in overdose cases because it is so potent that a crisis can emerge in seconds.

Families affected by addiction and a range of medical experts back the push, imploring legislators with wrenching testimony several times this year to defy federal warnings as Massachusetts did when it became the first state in the nation to legalize same-sex marriage.

Somerville Mayor Joe Curtatone is working to open a site in his city next year, but many in the Legislature have yet to endorse the idea, concerned about its legality and how such sites would affect professional licensures.

"This is a counter-intuitive approach," Sen. Julian Cyr, who supports the idea and co-chairs the Joint Committee on Mental Health, Substance Use and Recovery, told the News Service this week. "Many of our colleagues upon hearing this would have a kneejerk response of saying, 'wait a minute.' It's a different way of thinking. So we just want to make sure we're doing the due diligence to share with our colleagues what we heard today and what we've been hearing."

Although the Baker administration has embraced other strategies such as needle exchanges, Gov. Charlie Baker has repeatedly opposed calls for supervised consumption, often pointing to Lelling's prosecutorial threats.

An administration spokeswoman did not say Thursday if the governor's view had changed in the wake of the ruling.

"The Baker-Polito Administration remains focused on the legal, safe and evidence-based approaches to treatment, recovery and education that are already underway and have helped make Massachusetts one of very few states where opioid-related overdose deaths decreased in 2017 and 2018," Sarah Finlaw, the governor's press secretary, said in a statement.

The Harm Reduction Commission, which included medical professionals, individuals who use drugs and politicians, found significant evidence after studying the issue for months that supervised consumption sites reduce risks of death and disease.

Lelling contested those findings and the commission's conclusion that no overdose deaths had been reported inside any existing supervised consumption sites in other countries. He also pointed to the recent decline in total overdose deaths in Massachusetts, from 1,050 in the first half of 2018 to 938 in the first half of 2019.

"Opioid overdose deaths are down 11 percent over this time last year, a substantial drop and the continuation of a multi-year trend," Lelling said. "Now would not be the time to open a site for the purpose of making it easier to take heroin and fentanyl."