In recent weeks, a dangerous drug threat has popped up across the state. The acting Brooklyn district attorney indicted 34 people on narcotics charges involving the sale of a group of drugs that has driven city overdose deaths to record highs. It was cited as a driving factor behind a dramatic rise of opioid overdoses on Long Island, contributing to a record 493 opioid-related deaths in Suffolk and Nassau counties last year. And in the Southern Tier, where the drug has also been making inroads, a state lawmaker cited the seizure of 500 pills containing the drug but stamped to look like Tylenol or codeine.

The drug in question? Fentanyl, and synthetic variations of it, is far more powerful and lethal than heroin or prescription drugs. Used as an anesthetic or for patients with terminal illnesses, the drug is so fast acting that it’s harder to counteract, even with naloxone, a widely distributed antidote that has proven effective in reversing other opioid overdoses. Even worse, fentanyl is often mislabeled, so users may not know what they’re taking.

“We’re finding it mixed in with heroin, sometimes sold as heroin, sometimes mixed in with cocaine and sold as counterfeit Xanax pills as well – and it’s killing people,” Bridget Brennan, the New York City special narcotics prosecutor, said at City & State’s On Health Care conference last month. “The city Health Department has identified that as probably the single greatest contributor to the escalation of overdose deaths here in the city.”

RELATED: 5 projects Brooklyn leaders want to tackle next

More than 1,300 people in New York City died of a drug overdose in 2016, according to city figures released last month. Fentanyl cases have skyrocketed, making up less than 5 percent of overdose deaths before 2015, and rising to account for nearly half of such deaths in the last six months of 2016.

Making matters even more challenging, officials say, is that manufacturers in Mexico and China often exploit regulatory loopholes by producing versions of fentanyl that technically aren’t illegal.

“One of the issues ... is that the state law and federal law defines any controlled substance or illegal substance by its chemical name, so what we see distributors of illegal drugs doing is just altering in a very minor way the chemical composition – we call it analogues – and so that those analogues will no longer fall under the umbrella of the current state law,” Brennan said.

State Sen. Fred Akshar, a Southern Tier Republican and a co-chairman of the Joint Senate Task Force on Heroin and Opioid Addiction, said a package of legislation recently passed in the state Senate would close the loopholes. One bill adds variations of fentanyl to the state’s list of controlled substances while increasing penalties for selling them. Another prohibits any analogues of banned drugs.

Akshar, who spent 15 years in county sheriff’s offices before his election in 2015, said he once believed law enforcement was the answer to the opioid epidemic. Now, he sees access to treatment as critical – but the state Senate Republican legislation is critical as well.

RELATED: Scrambling to solve the human services sector’s fiscal crisis

“You know, unfortunately, not everyone in the state Legislature believes that’s the way to go,” Akshar said at City & State’s conference. “So while we may pass a series of bills in the New York state Senate, it’s very difficult when you are creating a new crime or increasing the penalties, to get that done in the Assembly. I would respectfully offer that sometimes, with this particular issue, we have to make those tough decisions, to give law enforcement the tools they need.”

Mike Whyland, a spokesman for the Assembly Democrats, called the measures “so-called solutions that don’t accomplish anything.”

“Most drug crimes are based on aggregate weight so to the extent fentanyl is added to heroin it is already counted in the charge level,” Whyland wrote in an email. “Also you should know that the Department of Health has broad regulatory authority to prohibit sale and possession of substances and create certain penalties while they are being reviewed by the federal government to be placed on the controlled substance list.”

During the panel discussion, Brennan emphasized the need for a balanced and multipronged approach. She cited as a model New York City’s efforts to combat K2, a synthetic marijuana drug that came on the scene in recent years and spread rapidly.

“The City Council devised an ordinance which prohibited the sale of it and allowed for certain enforcement actions,” she said. “Again, it was the blending of different enforcement tools, making sure that they were appropriately used and not penalizing an affected group too harshly, but allowing the tools to get the drug off the street.”