Amid the weeknight bustle of a Walmart parking lot in Centereach, N.Y., a young woman in a pickup truck had lost consciousness and was turning blue.

Her companion called 911. Possible drug overdose; come fast.

A Suffolk County police officer, Matthew Siesto, who had been patrolling the lot, was the first to arrive. Needles were visible in the center console; the woman was breathing irregularly, and her pupils had narrowed to pinpoints.

It seemed clear, Officer Siesto recalled of the October 2012 episode, that the woman had overdosed on heroin. He went back to his squad car and retrieved a small kit of naloxone, an anti-overdose medication he had only recently been trained to use in such circumstances. He prepared the dose, placed the atomizer in her nostril and sprayed.

“Within a minute,” the officer said, “she came back.”

Once the exclusive purview of paramedics and emergency room doctors, administering lifesaving medication to drug users in the throes of an overdose is quickly becoming an everyday part of police work amid a national epidemic of heroin and opioid pill abuse.