SAN FRANCISCO — San Francisco is pushing forward with plans to open the first supervised injection site for drug users in the U.S., setting it up for another clash with the Trump administration over drug policy.

The state legislature approved a bill this week that would allow the city to launch a three-year pilot program for centers where intravenous drug users can come to shoot up under the watch of a medical professional.

Proponents say that getting San Francisco’s heroin addicts off the streets and into a safe, clean environment would help fight deadly overdoses, limit the spread of infectious diseases, and stem the wave of used needles that litter the sidewalks in some neighborhoods.

But stringent opposition from the Trump administration is hanging over the proposal, with Deputy Attorney General Rod Rosenstein arguing in a New York Times op-ed this week that local officials who maintain a location for the use of illegal drugs are committing federal felonies and could face lawsuits or even prison time.

“Cities and counties should expect the Department of Justice to meet the opening of any injection site with swift and aggressive action,” Rosenstein wrote, adding that Americans struggling with addiction “do not need a taxpayer-sponsored haven to shoot up.”

The debate represents a clash between the administration’s tough-on-crime attitude and local officials who are pushing for a new approach as they struggle with the magnitude of a public health crisis.

Newly-elected Mayor London Breed has championed the proposal, arguing that it would be a key public health tool after 193 people died of drug overdoses in the city last year.

“If you walk on the streets of San Francisco, you can see the heartbreaking symptoms of this every single day,” she told reporters Wednesday. “Continuing with the status quo and just hoping that things will get better is not an option.”

Opening one 13-booth injection site, Breed said, would save the city up to $3.5 million a year by reducing hospital costs for overdoses and the transmission of diseases through dirty needles.

And while it would clearly fly in the face of federal law, California is already going against U.S. drug policy by licensing stores that sell recreational marijuana, pointed out Laura Thomas, the California deputy state director for the Drug Policy Alliance, a group that advocates for drug treatment over criminalization.

“It’s not a surprise that the Trump administration is coming out against this,” Thomas said in an interview. “San Francisco shouldn’t be making decisions out of fear of this administration.”

The bill that opens the door to the San Francisco experiment, AB186, still needs the signature of Gov. Jerry Brown. Breed has met with Brown to discuss the bill, but the governor’s office declined to comment on whether he will approve it.

Safe injection sites could also become a debate in this year’s governor’s race. Lt. Gov. Gavin Newsom, a Democrat, has said he’s open to the proposal, calling it a “novel strategy.” His Republican rival, businessman John Cox, described the idea as a “disaster” and said in a statement that the state should focus on job training and rehabilitation for drug users instead of “making it easier to support their disease.”

Even if the bill is signed into law, there’s no plan yet for when an injection site would open or whether it would be operated by the city government or a local non-profit. Injection sites would only be allowed in San Francisco, not elsewhere in the Bay Area or California.

“Although we have no plans to implement safe injection sites here, we are learning from the work and experience of others who are,” said Sara Cody, the Santa Clara County Health Officer.

Safe injection sites are de rigueur in many European cities, where they’ve been credited by researchers for helping reduce overdose deaths and get drug users into treatment. One model for San Francisco is Vancouver, which opened the first injection site in North America in 2003 and has seen zero fatal overdoses among its users.

Now, other cities around the U.S. like Seattle, New York and Philadelphia are also considering opening injection sites as they face growing numbers of heroin users shooting up on their streets.

Breed got a peek at what an injection site would look like on Wednesday as she toured a model location opened at Glide, a social services agency and food kitchen in the heart of the gritty Tenderloin neighborhood. A couple blocks away, a half-dozen men lay in a stupor on a sidewalk, with at least one needle visible on the ground.

Inside, the brightly-lit demonstration site looked a little like a hospital room, with stainless steel desks lining the wall and pouches of clean needles, syringes and anti-overdose medicine ready for use.

Doctors or trained volunteers would monitor the drug users at each booth, ready to administer oxygen or the anti-overdose medicine Naloxone, if needed. Heroin users would get reactive strips to test their drugs for the presence of fentanyl, a ferociously strong drug that is the leading cause of overdose deaths in the U.S. Users would also receive free clean needles and syringes, as well as hand sanitizer, alcohol wipes and safe containers for the disposal of used needles.

“This isn’t an opium den or a shooting gallery,” said Kenneth Kim, a psychologist and the clinical director at Glide. “The focus is on overdose protection.”

Still, he acknowledged that there were many hurdles before the model could actually operate as a real injection site. The biggest challenge, Kim said, is the federal government — and the fact that “the law is the law.”