NEW YORK — The upstate New York city of Ithaca could be home to the first public facility in the United States that would allow heroin users to inject the drug under medical supervision, if Mayor Svante Myrick gets his way.

The mayor, a Democrat, already faces a firestorm of opposition even before his planned unveiling of the plan on Wednesday with full details.

“I’ve found myself in the middle of a storm here,” Myrick said in an interview on Tuesday. “I’ve never received more emails, messages, text messages, tweets and Facebook posts.”

Modeled on similar centers in Europe and Canada, the facility would allow users of the drug to inject it in a safe location. Public health workers could monitor them to ensure they did not overdose, while also trying to steer them toward treatment.

The United States is struggling to stem a surge in abuse of heroin and other opioid drugs, including prescription painkillers. Federal data show 2.2 million U.S. residents struggling with addiction.

More emergency responders across the United States have made the anti-overdose drug Narcan part of their standard equipment, and the White House this month unveiled a push for $1.1 billion in new funding to expand addiction treatment.

Myrick’s proposal met with immediate criticism.

“I am wary of supervised injection sites,” said the city’s police chief, John Barber. “I will not condone the illegal use of heroin, supervised or not.”

Some online commenters said they opposed allowing drug users legal access to heroin, while others suggested a rehabilitation center as a better alternative.

Myrick, first elected in 2011 as Ithaca’s youngest mayor, noted this was not the first time that efforts to reduce the risk of drug use have run into public criticism.

“A lot of people said the same about syringe exchanges — if you’re giving away free needles, you’re just going to be encouraging people to use heroin,” said Myrick, now 28. “Nobody uses heroin because needles are available.”

Ithaca, a city of some 30,000 people, first convened a panel to study the problem two years ago, after three people died of overdoses in the span of a few weeks, Myrick said.

The mayor’s plan would need to be approved by the state government. Gov. Andrew Cuomo’s office did not immediately respond to a request for comment.