Philadelphia is poised to become the first city in the United States to open a supervised injection site after a federal judge issued a final ruling that the Safehouse facility would not violate federal drug laws.

Safehouse, a nonprofit incorporated in 2018 to provide overdose prevention services, announced Wednesday that it plans to open its first facility next week in South Philadelphia, with other sites in the works.

“It is important to remember that these sites are—first and foremost—about saving lives,” Philadelphia Mayor Jim Kenney said in a statement. “The bottom line is that overdose prevention sites—which exist in more than 100 cities around the world—offer compassion for fellow human beings, rather than misguided incarceration that only perpetuates the cycle of drug abuse.”

Safe injection facilities—also known as supervised consumption or overdose prevention sites—allow people to bring drugs they obtain elsewhere to use under the watch of trained staff, reducing the risk of overdose death. They provide sterile needles, which prevents transmission of HIV and hepatitis C. Indoor sites also reduce street-based drug use and discarded syringes. Finally, they offer an entry point for medical care, hep C treatment, addiction treatment and other services for people who use drugs.

There are currently around 150 sanctioned safe injection sites in at least 10 countries, including multiple sites in Canada. At least one unsanctioned underground site has been operating in an undisclosed U.S. city for several years.

This week’s ruling by U.S. District Judge Gerald McHugh is the latest step in a long-running legal battle to open safe injection sites in the U.S. Cities including Denver, New York, San Francisco and Seattle have also been trying to open such facilities. On Thursday, San Francisco Mayor London Breed announced plans to prepare to open local facilities when a pending state supervised injection bill passes.

Last February, the Department of Justice filed a lawsuit to block the opening of the Safehouse site, claiming it would violate the so-called crack house provision of the federal Controlled Substances Act, which makes it a crime to operate a site where illegal drugs are produced, distributed or consumed. The federal complaint argued that having good intentions does not provide an exception to the law.

In a decision in October, McHugh ruled that the proposed facility does not violate the law, concluding that there was no credible argument that Congress was considering safe injection sites when it adopted the statute in 1986.

“The ultimate goal of Safehouse’s proposed operation is to reduce drug use, not facilitate it,” he wrote. The ruling on Tuesday finalized that decision.

William McSwain, U.S. Attorney for the Eastern District of Pennsylvania, said he would appeal the ruling to the Third Circuit U.S. Court of Appeals. He has also warned that the federal government would “use all enforcement tools,” including arrests and asset forfeiture, to prevent the site from operating.

Opposition also comes from community members who do not want a supervised injection site in their neighborhood, citing fears of drug-related crime and disorder. Although initially expected to be located in Philadelphia’s Kensington neighborhood—the epicenter of the city’s opioid crisis—the first site will now open in the more residential South Philadelphia. Neighbors protested that this location was chosen without community input.

Safehouse vice president and secretary Ronda Goldfein, of the AIDS Law Project of Pennsylvania, indicated that the group wants to start with a smaller facility before expanding to Kensington.

“Philadelphia, like the nation, is in an overdose crisis, and we have the opportunity to address that crisis,” Goldfein said. She noted that Philadelphia has the highest number of overdose deaths among large U.S. cities, with three or four people dying every day.

Harm reduction advocates lauded the decision.

“The news from Philadelphia is a victory for everyone committed to the health, safety, and dignity of people who use drugs,” said Daniel Raymond of the Harm Reduction Coalition. “As a repudiation of the opposition from Trump’s Department of Justice, both the court ruling and the broader movement for safer consumption spaces offer a richer alternative vision of justice that rejects the stigma, criminalization, and inequities that push people who use drugs into harm’s way.”