The judge assigned to the federal lawsuit against the nonprofit aiming to open Philadelphia’s first supervised injection site has scheduled an evidentiary hearing asking for information on how a site might operate.

Last month, U.S. Attorney William McSwain asked U.S. District Judge Gerald A. McHugh to make a decision on the legality of supervised injection sites based solely on arguments made in court filings, rather than allowing in-court proceedings in which both sides could argue their case.

McHugh has not yet ruled on that motion. But, in an order Friday, he called for a hearing next month “limited to the issue of how … Safehouse proposes to operate,” meaning that the nonprofit will be able to explain its plans to the judge directly in at least one court appearance.

“We wanted a hearing — we wanted the opportunity to explain this is an appropriate lifesaving medical service,” said Ronda Goldfein, the vice president of Safehouse and the executive director of the Pennsylvania AIDS Law Project. (Goldfein is married to an Inquirer editor, David Lee Preston.) “There’s been a lot of conversation about this, and we are optimistic we’ll have an opportunity to have a judge look at these issues.”

McSwain’s office declined to comment.

McSwain has argued that such sites, which have operated for decades in Canada and other countries, would break a federal law known colloquially as the “crack house statute,” which prohibits the operation of a facility for drug use or sales.

Safehouse officials have countered that the crack house statute was never meant to prohibit supervised injection sites. They’ve argued that the sites are legitimate public health interventions where people in addiction can use drugs under medical supervision, be revived if they overdose, and access treatment.

The evidentiary hearing in the case has been scheduled for Aug. 19.

The hearing order came two days after interested parties from around the country filed friend-of-the-court briefs in the lawsuit. A group of community organizations in Kensington, the most likely location for a site, and the Fraternal Order of Police filed a brief supporting McSwain.

Attorneys general from seven states and the District of Columbia, more than five dozen current and former prosecutors and police chiefs from around the country, several local and national advocacy groups, and friends and family of people in addiction all filed briefs supporting Safehouse.

“We were very pleased, and felt a lot of support from all around the country,” said Jose Benitez, Safehouse’s president, who also runs the city’s only needle exchange, Prevention Point. “It’s really good to be supported this way.”