Lelling says he’s alarmed by misinformation about these clinics. He points to an overdose-related death last year in a supervised clinic in Ottawa, Canada, which authorities there blamed on an especially potent version of fentanyl.

"Barring a change in the Justice Department’s position, if Somerville opens one, federal enforcement will follow," Lelling said in a statement. "I agree that beating this public health crisis requires treatment and prevention as much as it does prosecution of drug traffickers. But supervised injection sites are not the answer."

But federal prosecutors in February sued to block the opening of a supervised consumption site in Philadelphia. And Massachusetts U.S. Attorney Andrew Lelling says he will take steps to do the same regarding Curtatone’s plans.

Massachusetts legislators are expected to consider changes in state laws and licensing regulations so that doctors and nurses could not be prosecuted for supervising illegal drug use.

The clinic is just common sense, Curtatone says, because research shows such sites, which are open in more than a dozen countries, not only save lives but are also a path to treatment .

“I just attended another funeral [Monday] for someone who was a victim to that epidemic,” Curtatone told WBUR on Tuesday. "Under the status quo, people will continue to die. We need to be bold to take on an epidemic."

Joseph Curtatone says a supervised consumption site (SCS) in his city will save lives during the opioid crisis.

Despite opposition from federal prosecutors, the mayor of Somerville is pledging to open a clinic next year where doctors and nurses would monitor illegal drug use and could reverse an overdose.

Curtatone says he hasn’t decided whether he’ll reach out to Lelling before moving ahead.

“We understand the U.S. attorney’s position,” Curtatone said. “What I'm more worried about and what keeps me up at night is the ever-expanding opioid epidemic and the lives that are being lost every day.”

Some legal experts say municipalities willing to host a supervised consumption site would be on the strongest legal footing if the site is run by a government entity and opened in response to a public health crisis. Curtatone says those details are under review with the help of a Somerville working group formed this summer to look at the legal, financial, operational and community impact issues involved in opening a SCS, what some advocates call an overdose prevention site.

The mayor expects to have a plan by the end of the year. He says police, firefighters and EMTs in his city are on board.

The Somerville working group includes Fenway Health and other health care facilities that might partner with the city on the project. Fenway Health runs a needle exchange program in Cambridge and does street outreach to drug users, in addition to offering LGBTQ health services.

“When people are ready to use, they have to leave our facility, they go into the streets, into alleys and public bathrooms,” said Carl Sciortino, Fenway Health's vice president for government relations. “When they use alone that's where they're dying.”

Sciortino says he isn’t sure how Fenway Health could be involved in the Somerville project without putting its status as a federally qualified health center at risk. He says some health care facilities faced similar risks in the mid-'90s when they wanted to hand out syringes to stop the transmission of HIV.

“We have to tread carefully and cautiously,” Sciortino said, but “now, with 2,000 people dying annually [in the state], I don’t think we can turn a blind eye.”

Aubri Esters, who represents the advocacy group SIFMA Now and says she would use the space, is also part of the Somerville working group. Esters says there are already informal supervised consumption sites in homes, tents and areas where drug users gather to support each other across the state, but they don’t have the benefit of medical interventions.

“We really appreciate that [Curtatone] has decided to put the lives of his citizens and the health of the community first, and not giving into fear tactics from [U.S.] Attorney Lelling or other folks,” Esters said.

A spokesman for Gov. Charlie Baker declined to comment for this story, pointing to past comments about pursuing treatment rather than an option that federal agents say is illegal.

Four other mayors — in Boston, Cambridge, Revere and Northampton — have said that they support the idea of supervising drug use to save lives, but none have announced plans to open a clinic or add the service to an existing health facility.

A WBUR poll released in May found Massachusetts residents narrowly support the idea of opening supervised consumption sites in the state. Earlier this year, a state commission recommended creating one or more SCS pilot programs.

"People have to understand that this opioid epidemic is the public health crisis of our generation," said state Rep. Jeff Roy, a Franklin Democrat who served on the commission. "Safe consumption sites are just one more tool in the toolbox to help people recover. You can't put a dead person into recovery."

Somerville recorded eight opioid overdose deaths last year, down from 12 in 2017 and 19 in 2016. The city says police and fire department responders used 183 doses of naloxone in 67 calls related to overdoses during 2018. One dose of naloxone, often referred to by the brand name Narcan, is often not enough to revive someone who has stopped breathing after injecting the powerful opioid fentanyl.