Cannabis makes pain more bearable rather than actually reducing it, a study from the University of Oxford suggests.
Using brain imaging, researchers found that the psychoactive ingredient in cannabis reduced activity in a part of the brain linked to emotional aspects of pain.
But the effect on the pain experienced varied greatly, they said.
The researchers' findings are published in the journal Pain.
The Oxford researchers recruited 12 healthy men to take part in their small study.
Participants were given either a 15mg tablet of THC (delta-9-tetrahydrocannabinol) - the ingredient that is responsible for the high - or a placebo.
The volunteers then had a cream rubbed into the skin of one leg to induce pain, which was either a dummy cream or a cream that contained chilli - which caused a burning and painful sensation.
Each participant had four MRI scans which revealed how their brain activity changed when their perception of the pain reduced.
Dr Michael Lee, lead study author from Oxford University's Centre for Functional Magnetic Resonance Imaging of the Brain, said: "We found that with THC, on average people didn't report any change in the burn, but the pain bothered them less."
MRI brain imaging showed reduced activity in key areas of the brain that explained the pain relief which the study participants experienced.
Dr Lee suggested that the findings could help predict who would benefit from taking cannabis for pain relief - because not everyone does.
"We may in future be able to predict who will respond to cannabis, but we would need to do studies in patients with chronic pain over longer time periods."
He added: "Cannabis does not seem to act like a conventional pain medicine. Some people respond really well, others not at all, or even poorly.
"Brain imaging shows little reduction in the brain regions that code for the sensation of pain, which is what we tend to see with drugs like opiates.
"Instead cannabis appears to mainly affect the emotional reaction to pain in a highly variable way."
Mick Serpell, a senior lecturer in pain medicine at Glasgow University, said the study confirmed what was already known.
"It highlights the fact that cannabis may be a means of disengagement for the patient, rather than a pain reliever - but we can see that happen with opioids too."