For the first time, scientists have discovered how the cannabis plant produces molecules that are highly effective at tackling pain. The team behind the research hope their findings might one day help us create new painkillers that come without the troublesome side effect of potential addiction.

The team, based at the University of Guelph, used a combination of genomics and biochemistry to work out how the cannabis plant makes cannflavin A and cannflavin B, two molecules that are 30 times better at quelling inflammation than aspirin.

The molecules are known as flavonoids and we've been aware of their existence since 1985. However, due to strict regulation on cannabis research, work on these molecules has been limited. Now, thanks to Canada’s recent legalization of cannabis, scientists have been able to investigate them unhindered.

The team used biochemical techniques to work out which genes are needed to make the two molecules and which enzymes are involved in the production process. Their findings are published in the journal Phytochemistry.

"Our objective was to better understand how these molecules are made, which is a relatively straightforward exercise these days," said study co-author Professor Tariq Akhtar in a statement. "There are many sequenced genomes that are publicly available, including the genome of Cannabis sativa, which can be mined for information. If you know what you're looking for, one can bring genes to life, so to speak, and piece together how molecules like cannflavins A and B are assembled."

Knowing how cannflavin A and B are made could help us tackle the opioid crisis. The molecules are not psychoactive – they don’t affect the mind, like opioids or the THC in cannabis do – and target pain directly. This means that we could use them to create a new class of painkillers that don’t carry such a risk of addiction. A recent study found that people in Colorado are increasingly using marijuana to treat pain and many have cut down on their opioid use as a result. However, using cannabis in the conventional way does itself carry addiction risks.

"There's clearly a need to develop alternatives for relief of acute and chronic pain that go beyond opioids," said Akhtar. "These molecules are non-psychoactive and they target the inflammation at the source, making them ideal painkillers."

With their new understanding of how these pain-fighting molecules are synthesized, the researchers are now attempting to develop a biological system that can produce them in large quantities. The two flavonoids are produced in small amounts by the cannabis plant, so even genetically engineered plants wouldn’t be able to produce sufficient amounts. The researchers have licensed a patent to produce the two cannflavins outside of the cannabis plant in collaboration with a Canadian company called Anahit International Corp.

"Being able to offer a new pain relief option is exciting, and we are proud that our work has the potential to become a new tool in the pain relief arsenal," said study co-author Professor Steven Rothstein.