TORONTO — Ontario researchers have teamed up to test a portable device that can detect the presence of potentially deadly fentanyl in street drugs and deliver the results in mere seconds.

The scientists at the University of Ottawa and Carleton University have set up the mass spectrometer instrument at the supervised injection site within the Sandy Hill Community Health Center in the nation’s capital, which like many Canadian cities has witnessed rising numbers of overdose deaths due to the illicit narcotic.

Jeff Smith, director of the mass spectrometry centre at Carleton, said the device is able to detect fentanyl in a minuscule sample of a street drug like heroin within 20 seconds — compared to the months it would take through standard lab testing.

Mass spectrometers are able to differentiate components of drugs by assessing their mass, or molecular weight.

“If you can measure every individual component of a sample and get its mass, you can identify what’s in that sample,” Smith said Thursday from Ottawa.

Substances, including drugs like fentanyl and the even more toxic carfentanil, each have unique molecular weights, allowing for them to be identified by their mass, he said.

Only a tiny drop of a syringe-prepared drug needs to be taken as a sample and placed into the port of the laser printer-sized instrument made by U.S.-based Bayspec, which the universities purchased for about US$100,000 with a grant from the Canadian Institutes of Health Research.

So far, the research team has created methods for the miniaturized mass spectrometer to test samples for five drugs — fentanyl, carfentanil, cocaine, heroin and methamphetamine.

“But that list can be dramatically expanded,” he said. “And of course that is our plan over the next few months, to add more and more drugs to the list of all of the things that might be present in a user’s sample.”

Rob Boyd, director of Sandy Hill’s Oasis program that oversees the supervised-injection site, said because clients are purchasing unregulated drugs off the street, they have no idea what ingredients they contain.

“So anyone purchasing heroin from the street, we have cautioned them to assume that you have fentanyl and to take the necessary provisions to prevent overdoses and overdose deaths,” he said.

“This will provide them with an opportunity to have their drug checked before they actually use the drug.”

Boyd said the research is aimed at demonstrating the usefulness of the technology, which could be adopted by other communities rocked by the opioid overdose crisis, in Canada and throughout North America, or “wherever it’s needed.”

“So us being able to do this now will benefit communities if they are interested in purchasing the instrument or the same technology.”

Principal researcher Lynne Leonard, director of the HIV and hepatitis C prevention team at the University of Ottawa, called the mass spectrometer “the right intervention at the right time.”

Users who overdose because they are unaware their drugs have been tainted by fentanyl, for instance, can be rescued with a shot of naloxone.

“Naloxone is extremely effective and we know it’s brought people back from overdoses, but that’s after the event,” Leonard said. This “technology actually is going to help people know what’s in their drugs before they even inject them.”