PHILADELPHIA (AP) — A federal judge ruled Wednesday that supervised injection sites designed to prevent overdoses do not violate federal drug laws, giving advocates in Philadelphia and perhaps elsewhere a boost in their efforts to open them.

U.S. District Judge Gerald A. McHugh said there’s no evidence that Congress intended 1980s-era drug laws to cover sites where people could inject drugs and have medical help nearby if they need it.

“Safe injection sites were not considered by Congress and could not have been, because their use as a possible harm reduction strategy among opioid users had not yet entered public discourse,” McHugh said in his ruling.

U.S. Attorney William McSwain, an appointee of Republican President Donald Trump, had gone to court in Philadelphia to try to block the plan, calling the goal “laudable” but supporters misguided.

Mayor Jim Kenney, District Attorney Larry Krasner and former Pennsylvania Gov. Ed Rendell, all Democrats, believe the program would reduce the city’s 1,100 annual overdose deaths and help steer users into treatment.

Rendell helped found the nonprofit group that would run the program, called Safehouse, after the overdose death of a family friend.

Ronda Goldfein, a Safehouse vice president, said the group would seek clarity from McHugh in the next few weeks on whether to move forward with plans to open sites across the city.

The Justice Department appeared likely to challenge the decision. Deputy Attorney General Jeffrey A. Rosen said the department was disappointed and would “take all available steps to pursue further judicial review.”

“Any attempt to open illicit drug injection sites in other jurisdictions while this case is pending will continue to be met with immediate action by the department,” he said in a statement.

The issue has divided public officials in Philadelphia and around the nation, although similar sites are in use in Canada and Europe. Supervised injection sites are also being considered in other U.S. cities including Seattle, New York, San Francisco and Somerville, Massachusetts.

Under the Safehouse plan, people struggling with addiction could bring drugs to the clinic-like setting, use them in a partitioned bay and get help from nearby medical help if they overdose. They would also be counseled about treatment and other health services.

“It’s a better option than having people die in streets and alleyways and fields. And it will also help the community,” said Debbie Howland of Drexel Hill, who lost a daughter to an overdose death last year.

She volunteers several days a week in Philadelphia’s drug-ravaged Kensington neighborhood, and bemoaned that small children have to walk past dirty needles and “devastated” users on their way to school.

“With 70,000 people dying a year (nationally), you’ve got to do something,” she said Wednesday.

However, some neighborhood groups and city council members representing the area oppose the plan and have vowed to keep fighting it.

Safehouse lawyers had argued that it wasn’t clearly illegal under the Controlled Substances Act — which regulates the possession, use and distribution of certain drugs — to stand nearby with life-saving medical help.

McHugh in his ruling agreed.

“The ultimate goal of Safehouse’s proposed operation is to reduce drug use, not facilitate it, and accordingly, (the law) does not prohibit Safehouse’s proposed conduct,” he wrote.

The decision come as federal, state and local authorities pursue billions of dollars in legal damages from pharmaceutical companies that manufactured and marketed opioid products.