Scientists in California have developed a strain of yeast that can be used to brew cannabis extract rather than beer.

With just the addition of sugar, the genetically modified yeast fermented to produce pure cannabinoid compounds including mind-altering THC and the non-psychoactive CBD, which is used medically to treat conditions including chronic pain and childhood epilepsy.

The scientists, who have already launched a cannabinoid brewing company, say the process is considerably cheaper, safer and more environmentally friendly than extracting the compounds from marijuana plants.

Jay Keasling, a professor of chemical and biomolecular engineering at the University of California Berkeley, was the lead author of the study. “The process is just like brewing beer,” she said. “You feed the yeast sugar and they produce the cannabinoid you want to produce, rather than ethanol, which they would normally produce.”

The designer yeast also yielded novel cannabinoid compounds or chemicals that exist only in tiny quantities in marijuana plants, raising the possibility that brewing could revolutionise the production of these substances and expand their potential medical applications.

In conventional brewing, yeast produces enzymes that naturally turn sugar into alcohol and carbon dioxide. In the souped-up version, the scientists inserted more than a dozen genes into the yeast’s DNA, many of them copies of genes used by the marijuana plant to synthesise cannabinoids.

The genes pump out enzymes, which act as catalysts in a chain of chemical reactions, starting out with sugar and leading, eventually, to a chemical called cannabigerolic acid, described as “the mother of all cannabinoids”. A range of cannabis compounds, including THC and CBD, can be derived from this acid.

Pinpointing the exact mix of genetic insertions that needed to be made to the yeast was a complex and lengthy process. But now that the cannabinoid-producing yeast has been created, it can be cultivated in the same way as ordinary brewers’ yeast. “That’s the beauty of the process,” said Keasling.

Cannabis and its extracts, including THC, which produces the high people feel when they smoke a joint, represent a multibillion-dollar business nationwide. Medications containing THC have been approved by regulators in several countries, including the US, while CBD, or cannabidiol, has been approved as a treatment for childhood epileptic seizures and is being investigated as a therapy for conditions including anxiety, Parkinson’s disease and chronic pain.

However, medical research on the more than 100 other chemicals in marijuana has been difficult, because the chemicals occur in tiny quantities, making them hard to extract from the plant. Brewing could provide inexpensive, purer sources of these chemicals, making it possible to study their effects in detail for the first time. “Some of these could be blockbuster drugs,” Keasling said.

In the lab, the scientists used flasks to grow the yeast, but plan to scale up production to use large stainless steel tanks that are typically used in a brewery. Keasling and colleagues have formed a company called Demetrix, which they anticipate will be able to commercially supply small quantities of product in the next year and large quantities within three years.

The team said that using yeast would be a “greener” way to cultivate cannabis, which is a water-hungry crop and is often farmed using heavy quantities of pesticides and fertilisers. Indoor growing under lights and with ventilation fans uses a lot of energy – one study estimated that California’s cannabis industry accounted for 3% of the state’s energy usage.

The findings are published in the journal Nature.