Scientists in Switzerland think they've found a moss-like plant that's even better at relieving pain than cannabis.

This simple and unassuming plant is endemic to New Zealand and Australia, and it's name, however unflattering, is liverwort.

For a little over two decades, liverwort has been known to contain perrottetinene (PET), a compound that closely resembles tetrahydrocannabinol (THC), the psychoactive ingredient found in cannabis.

But while there's plenty of anecdotal evidence that liverwort can give you a mild but "legal high", until recently, nothing was known about the plant's actual pharmacology.

Using mouse models, scientists at the University of Bern have shown for the first time that the active substance in liverwort works in a similar way to THC.

If the findings are verified, it could mean that there is another plant, other than cannabis, that can produce a variant of this cannabinoid.

"It's astonishing that only two species of plants, separated by 300 million years of evolution, produce psychoactive cannabinoids," says senior author Jürg Gertsch, who researches molecular pharmacology of the endocannabinoid system at the University of Bern.

The first liverworts arose as green algae some 400 million years ago, well before more advanced, flowering plants like cannabis came along.

Even still, the physical structure of PET looks strikingly similar to THC. In fact, apart from its three-dimensional shape and its extra benzyl group, the individual atoms of PET are linked in a very similar pattern.

As such, PET can easily make its way into the brain. Once there, the researchers found that it specifically attaches itself to cannabinoid receptors CB1 and CB2, but at levels ten times lower than THC.

This means that while liverwort's psychoactive substance appears to provide many of the same medicinal benefits as THC, it is not strong enough to induce the same euphoric "high".

What's more, unlike THC, PET was also found to inhibits prostaglandins in the brain that can cause inflammation.

"This natural substance has a weaker psychoactive effect, and at the same time, is capable of inhibiting inflammatory processes in the brain," explains first author Andrea Chicca, who does research in drug discovery and development at the University of Bern.

Despite what some might think, the weaker psychoactive effect isn't necessarily a bad thing. In fact, it's quite the opposite. It could make the compound far more useful in medicine.

Comparing the medicinal effects of PET and THC, the researchers found that PET was better at relieving pain and reducing inflammation in the brain. It also came with fewer side effects.

And, even better, it's legal, which means that scientists can actually study the plant without having to worry about restrictions on its use.

But even though research on liverwort is still in its infancy, the authors of the new paper think they are on to something.

"In a direct comparison I think perrottetinene is the better version of THC," Gertsch told Motherboard.

The researchers are now calling for pre-clinical studies on the psychoactive substance to better determine its effect on chronic and inflammatory pain.

The study was published in the journal Science Advances.