For 35 years, Andrew Epstein has been filling prescriptions at a Brooklyn pharmacy without a problem.

"A man came in pointing a gun at the cashier and said, 'You have 10 seconds to give me everything in your narcotics drawer,'" Epstein said of the 2011 incident, where an armed robber stole painkillers from his pharmacy. "I said, 'Please don't shoot anybody.' I just wanted to get him out as fast as possible."

Epstein isn't alone, according to a Freedom of Information Act request filed by NY1.

Over the past five years, there have been over 4,000 armed pharmacy robberies nationwide, including 87 in New York State alone.

"There's millions of millions of dollars being stolen," said James Hunt, who heads the Drug Enforcement Administration’s New York office.

The DEA keeps track of all stolen narcotics in the United States.

"They're basically stealing opiates, oxycontin, hydrocodone, which they can easily sell on the street," Hunt said. "Those pills on the street can fetch upwards of $30."

Criminals are willing to do anything to get their hangs on these pills, like a duo in Texas who drilled through a safe to steal $1 million worth of painkillers.

"That's better robbing a bank," Hunt said.

There’s been a 20 percent increase in armed pharmacy robberies in the past five years, which Hunt attributes to a crackdown on prescriptions in the wake of the national opioid epidemic.

"There is a big, has been a big push in doctors prescribing less opiates. So with that, there's less opioids on the street in the pill form," Hunt said. "But there are opioids in these pharmacies, they know they're there. So that's why I attribute a lot of break-ins and armed robberies, too, because they aren't as plentiful as they were a few years ago because doctors can't write as many scripts. They can only issue, say, a few days' supply rather than a 30-day supply."

After the robbery, Epstein says he approaches filling prescriptions for opioids in a different way.

"If they need it for a legitimate purpose, I know they've been operated on. I know they have some, you know, diseases that induce a lot of pain, I will order it for them," said Epstein.

Pharmacies are also installing more surveillance cameras and using bait bottles with GPS to track criminals. But for the DEA, the work doesn’t stop there.

"It's educating the licensed people of doctors, pharmacists, and it's law enforcement going after the bad guys," said Hunt.