Canadian and U.S. researchers have found a way to "home brew" the chemical building blocks for painkillers like codeine and morphine, in a ground-breaking discovery expected to benefit science but worry federal regulators.

The joint study by Concordia University and UC Berkeley scientists used yeast to transform basic chemicals into the precursors for opiates like codeine, morphine and oxycodone. The process capitalizes on the age-old system of using yeast to transform sugar into alcohol. With a genetic tweak, the yeast can be encouraged to turn inexpensive yeast into rare, plant-based chemical compounds.

Prior to the study, morphine and many other prescription drugs were exclusively made by harvesting chemicals from government-regulated plants like the poppy. But with genetically modified yeast, morphine brewing could one day become as easy as whipping up a batch of moonshine at home.

Co-authors Vincent Martin, of Concordia, and John Dueber, of UC Berkeley, say they're aware of the "serious implications" of their discovery, and they're already warning lawmakers about the potential for misuse.

"The field is moving surprisingly fast, and we need to be out in front so that we can mitigate the potential for abuse," Dueber said in a statement.

"We can explore many different paths to other potential drugs, not just opiates," added Vincent Martin, a professor of microbial genomics and engineering at Concordia University in Montreal.

Martin and Dueber have not produced a drug from scratch yet, but they say they're well on their way to doing so within the next decade.

"Sugar-fed yeast could reliably produce a controlled substance," Dueber said.

Martin and Dueber published their joint study in the journal Nature Chemical Biology on Monday, outlining the process for producing a chemical called reticuline using modified yeast.

Martin published another a study in the journal PLoS ONE that takes the process a step further, demonstrating how yeast can transform reticuline into chemical precursors for codeine, morphine and oxycodone.

Researchers have been working for decades to produce yeast that mimics the chemical output of poppies, in hopes of creating a cheaper alternative to harvesting the plants. However, science has struggled to synthesize the early stages in the lengthy narcotic-producing process.

Martin and Dueber say they've figured out those early steps, and before long, others will be able to follow in their footsteps. But that could open the door for genetically modified yeast to be used in the illegal production of addictive painkillers, Martin and Dueber warn.

Dueber said it's important for governments to "think this through now, before it becomes a reality."

With files from The Associated Press