The heroin epidemic devastating upstate New York is getting so bad, even the cops are overdosing.

As police struggle to combat opiate abuse in Erie County, one of their own nearly died after allegedly overdosing last week, The Buffalo News reported—a grim testament to the scope of the heroin surge that appears to have no end in sight.

The News identified the officer as Michael R. Moffett, a two-year member of the force who allegedly took heroin at a friend’s home early Friday. Police sources believe Moffett used an especially deadly, fentanyl-laced form of the narcotic.

Moffett, 26, was off-duty when he overdosed, according to the News. Around 3 a.m., his friends noticed something was wrong and flagged down a patrolman, who happened to be driving past the home and would soon save his comrade’s life.

According to the News, the on-duty officer administered at least two doses of Narcan, an opiate antidote, to revive Moffett.

Moffett, who joined the Buffalo Police Department in 2014, was transported to the hospital shortly after. He’s on unpaid medical leave and is under investigation by the force’s Internal Affairs Division, the News reported.

“The department has a zero-tolerance policy on drugs, and something like this really is shocking. Right now, we are in shock mode. This is unheard of,” one police officer with knowledge of the incident told the News.

Buffalo Mayor Byron Brown confirmed the city’s most recent heroin overdose but declined to say whether the officer would be fired, WGRZ reported.

Brown said an “investigation will determine the course of action in this particular case.”

Moffett did not return phone calls or emails left by The Daily Beast.

Authorities believe Moffett had used fentanyl-laced heroin, which has killed 23 people in Erie County over an 11-day period starting Jan. 29, the News reported. Half of those deaths were in Buffalo.

The problem is so severe that county and federal officials issued an “emergency warning” this month, warning people to trash packets of heroin they recently purchased but haven’t used.

“The vast majority of the deaths, 19 of the 23, are believed to be related to heroin laced with an extremely fatal batch of fentanyl,” Erie County Executive Mark Poloncarz said, according to the News. “If you have a packet of this drug you recently purchased, it is basically a death sentence.”

The super-potent drug is up to 50 times stronger than ordinary heroin, and could actually be pure fentanyl or heroin spiked with the synthetic opioid, authorities say.

On Wednesday, New York State Police announced the arrest of Robert L. Smith, 28, of Buffalo after a SWAT team found 167 bags of fentanyl at his residence. Authorities allegedly caught on to Smith after the Amherst Police Department learned of an individual selling the deadly opiate.

Earlier this month, a 21-year-old Seneca County woman purchased some of the deadly painkiller in Buffalo and lost consciousness after smoking it, the News reported.

Her 26-year-old boyfriend dialed 911, and it took three doses of Narcan for an Amherst police officer to revive her.

Indeed, one dose of the opiate antidote, also known as Naloxone, is likely not enough for the potent street drug, Erie County’s health commissioner, Gale Burstein, said this month.

The morning Moffett allegedly OD’d, several Buffalo officers, a lieutenant and ambulance arrived on the scene. The call was logged as “unknown trouble” and “two Narcan doses were administered,” and listed as completed at 7 a.m., police sources told the News.

“This is the first time we have had an officer who had taken heroin,” one cop, who wasn’t authorized to comment publicly, told the News. “We’ve had other officers in the past who have lost their jobs because they tested positive for marijuana or cocaine, but this is the first time we’ve had heroin.”

According to the News, the Buffalo police department hasn’t randomly drug-tested officers in more than two years after a medical reviewer officer contract ended. The force ordinarily conducts drug testing once a year.

Buffalo’s Police Benevolent Association president said he expects the city to hire a new medical review officer by April or May, according to the News.

The police department and police union did not return messages left by The Daily Beast.

Still, the Buffalo force has responded to hundreds of opiate overdose calls in the last two years. According to the News, more than 350 people have died from overdoses in Erie County since 2014.

On one summer day in 2015 alone, Buffalo cops saw 10 opiate overdoses in about 24 hours. One man died, and one woman overdosed twice, the News reported.

At the time, Buffalo investigators hit the pavement trying to determine who was bringing in the ultra-potent opiates, as the county’s health commissioner held two-hour training courses with instructions for administering Narcan.

But this killer heroin isn’t unique to upstate New York. This month, The Daily Beast detailed how New Orleans authorities were dealing with their own fatal, fentanyl-spiked brew.

One Big Easy paramedic, Brook Christy, said she tried to convince her patients that the heroin circulating in the city is a “totally different monster” from their usual purchases.

“It’s killing people. It is dropping them left and right,” Christy told The Daily Beast.