More restrictive painkiller prescribing laws are drying up supplies of legitimate opiates being diverted for sale on the street, which is fueling a black market for more counterfeit pills.

These are created using pill presses, stamps and dyes readily available online from China.

Drug dealers are creating the counterfeit opiates from Fentanyl, a synthetic opiate 50 times more potent than heroin and 20 times cheaper.

But University of Florida researchers are working on a new device to identify bad drugs and potentially save thousands of lives.

“This is impacting all of the United States,” said DEA Special Agent Mike Furgason, who is seeing an increasing number of cases involving counterfeit drugs in his role as Assistant Special Agent in Charge of the Tampa District Office.

Drug dealers earn millions by making pills that look exactly like legitimate pills from a pharmacy using Fentanyl they bought on the dark web.

“If a pill's worth $80 and you sell 10,000 pills, you just made quite a bit of money. And you may have only paid a couple of thousand dollars for your initial investment,” Furgason said.

The street price of heroin is about $100,000 per kilogram.

Fentanyl can be purchased for about $5,000 per kilogram.

Counterfeit pills have already been blamed for several deaths in Florida, including nine people who died in Pinellas county in 2016 after taking counterfeit Xanax.

“This particular device could be put into the pharmacy,” said University of Florida Researcher Dr. Swarup Bhunia.

He and his team designed a device that can perform a quick chemical analysis on any pill without damaging it.

The intention is to place them in kiosks in pharmacies and retail stores, where consumers can bring and test their medicine.

“You can actually put it underneath the kiosk and it can tell you the composition of that,” he said.

The technology would identify counterfeit pills and dangerous components in medicines purchased from overseas.

The technology behind the device allows it to detect such counterfeit issues as formulas with incorrect components, formulas with incorrect amounts of components, pill presses used for production that are not those of the legitimate pill manufacturer and pills which are beyond their expiration date.

Currently, about 10 percent of drugs imported from developing countries are fake or substandard.

“It can even tell you if it has any chemical contaminant or anything bad, which you should not consume,” said Dr. Bunia.

The device is currently just a prototype, but University of Florida researchers hope that when they are put into mass production and widespread use in the next few years, they will be available for about $300 each.

At that price point, they say they will also be ideal for people who order medicine from other countries, where there are fewer protections than the FDA provides for medicines sold in pharmacies in the United States.