A cannabis-like chemical produced naturally in the brain aids pain relief, researchers have found.
The chemical acts in the brain
The US scientists said the finding may lead to new drugs which can stimulate this natural response.
Research has so far concentrated on developing compounds in cannabis itself into medications.
But, writing in Nature, the team said their new understanding of how the brain chemical works could lead to drugs with fewer side-effects.
When the body experiences pain under stressful circumstances, such as an injury during sport or even after a gunshot wound, the body is protected for a period of time - a response called stress-induced analgesia.
A study in rats by the researchers from the University of California, Irvine, and the University of Georgia found, for the first time, how chemicals called endocannabinoids play a part in this process.
Production of one cannabinoid compound, 2-AG, was found to be triggered by stress-related pain.
The researchers then looked at ways of boosting this natural response.
Normally, an enzyme called monoacylglycerol lipase brings the production of 2-AG to a halt.
The team, including Professor Danielle Piomelli, director of the Center for Drug Discovery at the University of California, Irvine, developed a chemical which was able to block the enzyme's action, meaning the body could theoretically continue to keep producing 2-AG.
Professor Piomelli said: "This study shows for the first time that natural marijuana-like chemicals in the brain have a link to pain suppression.
"Aside from identifying an important function of these compounds, it provides a template for a new class of pain medications that can possibly replace others shown to have acute side effects.
"If we design chemicals that can tweak the levels of these cannabinoid compounds in the brain, we might be able to boost their normal effects," Professor Piomelli said.
Dr Andrea Hohmann, a neuroscientist at the University of Georgia, who also worked on the research, added: "There is no prescription or over-the-counter drug that allows us to manipulate the level of the brain's compounds.
"This is the first time anyone has shown that one of the body's natural occurring cannabinoids, 2-AG, has anything to do with pain regulation under natural conditions."
Dr Anita Holdcroft, a reader in anaesthesia at Imperial College, told the BBC News website said the paper added to knowledge about how the body dealt with pain.
"This 2-AG cannabinoid doesn't have a receptor in the brain.
"So while it was known it played a role in the body's response to pain, people did not know how."