Scratching helps to relieve an itch because it reduces the sensations of pain sent to the brain, a new study has found.
However, the effect was produced only when the skin was genuinely itchy, researchers found.
Neuroscientists believe that the findings could be used to discover potential treatments, including drugs, to offer relief to patients suffering from chronic itches.
Previous studies had suggested that a specific part of the spinal cord, called the spinothalamic tract, played a key role in how we perceive itchiness.
Scientists found that skin cells in that part of the body tended to respond more to itchy substances than those in other areas.
Now researchers from the University of Minnesota have shown that in primates scratching the spinothalamic tract prevented the spinal cord from transmitting signals of itchiness to the brain.
Dr Glenn Giesler from the university, who led the research, said that he hoped that it could be used to understand more about the complex reasons behind what causes itches and even develop to effective treatments to fight the sensation.
Itches can be caused by many reasons, including skin conditions, such as eczema or psoriasis, or even by diseases such as shingles and gallbladder problems.
However, many itches have no known cause and seem to have no function in the body.
The findings were published in the journal Nature Neuroscience.