Organizers behind Safehouse, the nonprofit aiming to open the nation’s first official supervised injection site, returned to federal court Thursday to grapple with what may be the plan’s biggest hurdle: A federal law meant to fight a different drug scourge.

Known colloquially as the “crack-house statute,” read literally it could appear to prohibit places where addicted people could use drugs in the presence of medical workers trained to save them from fatal overdoses.

Justice Department officials cited it when they sued the nonprofit this year, seeking to block Safehouse’s planned opening in Kensington, ground zero for Philadelphia’s opioid crisis. The law was also the sole reason U.S. District Judge Gerald A. McHugh called the two sides to court as he weighs a ruling that will shape the national legal debate on supervised injection sites.

When challenged Thursday as to how Safehouse could legally operate under the nearly 33-year-old statute, passed to outlaw facilities that enabled the use of illegal drugs, Safehouse attorney Ilana H. Eisenstein asserted that wasn’t her client’s motivation at all.

At the height of the 1980s’ crack cocaine epidemic, lawmakers never considered the type of public health intervention that Safehouse is proposing, she said. Rather, the aim was empowering law enforcement to go after the owners and tenants of drug dens that blighted inner-city communities.

“Safehouse has a singular purpose, which is to save the lives of our loved ones suffering from addiction and our communities that have been ravaged by the opioid crisis,” she said.

But U.S. Attorney William M. McSwain countered: “The statute is clear. Congress has made a judgment — don’t set up a place to do drugs.”

Thursday’s proceedings were the second hearing McHugh had scheduled in a case closely watched by supporters and opponents across the nation, as it is expected to set a precedent on the legality of sites intended to give drug users a safe place to use, to be revived if they overdose, and to access medical treatment.

Other U.S. cities, such as New York and Seattle, are considering such programs, which have been in place for years in Canada and Europe. Philadelphia has become a focus for the debate as it continues to struggle with the nation’s biggest urban drug crisis, one that has killed thousands and has resisted traditional prevention measures.

Demonstrators, many of whom had lost relatives to overdoses, rallied outside the federal courthouse Thursday carrying signs calling for drastic shifts in drug policy, and handing out literature on supervised injection sites’ benefits in other countries.

They were joined by Mayor Jim Kenney and District Attorney Larry Krasner, both of whom have endorsed the supervised injection site idea.

McHugh made clear from the start of Thursday’s proceedings that his focus was specific.

“The issue before me is not whether it’s good public policy,” he said. “The issue before me is not whether it’s good for public health. My job is to apply this statute to the facts.”

What followed was a two-hour, at times lawyerly exegesis of two paragraphs in the 1986 Controlled Substances Act.

The relevant portion reads: “It shall be unlawful to … manage or control any place … for the purposes of unlawfully manufacturing, storing, distributing or” — most central to Safehouse’s case — “using controlled substances.”

Much was made in court Thursday on the meaning behind phrases like “for the purposes of.” Safehouse argued its primary purpose is saving lives.

“That’s a laudable purpose,” McSwain shot back. “But it’s a necessary precondition that you’re inviting people onto the property for the purpose of using drugs.”

McHugh steered most of Thursday’s discussion, peppering both sides with tough questions and giving no real indication which way he might be leaning.

He asked McSwain if Congress even contemplated the idea of a supervised injection site when the “crack-house statute” was created in the 1980s. And if not, would it have intended to criminalize such a site?

Lawmakers made other exceptions in the law for medical or research purposes, McSwain responded, and had they intended to allow the sites, they would have said so.

“They’re on the steps of the wrong institution,” McSwain said of Safehouse’s organizers. “They’re on the steps of the courthouse.… They should ask Congress to change the law, and there should be public debate.”

Later, McHugh questioned Eisenstein on Safehouse’s assumption that if the law does not specifically prohibit what they are proposing, then it should be allowed.

She argued that the nonprofit’s plans don’t differ that much from other public health initiatives including needle exchange programs, like Prevention Point in Philadelphia, that have garnered federal support.

“We’re already providing all of the consumption equipment through federally endorsed programs, then we have to show them the door,” she said. “All that would change is that we’re allowing them to stay within proximity to urgent, lifesaving medical care.”

McHugh gave no indication at the conclusion of Thursday’s proceedings of when he might issue his ruling.