Being snubbed socially provokes exactly the same brain response as being physically hurt, say US researchers.
The same brain area "lit up" on the scan
Volunteers were asked to play a computer game designed to fool them into feeling excluded, while brain scans were taken at the same time.
After the computerised snub, the scan detected activity in an area of the brain linked to physical pain.
Experts say the study, from the journal Science, is a hint to the importance the brain places on social ties.
The researchers involved in the study, from the University of California at Los Angeles, used an MRI scanner to probe the brains of their test subject as their feelings were manipulated.
These scanners can detect subtle changes in blood flow to various parts of the brain - which indicate when the region is active.
To provoke the right response, they devised an ingenious computer simulation designed to be reminiscent of a playground game.
The participants were shown a screen which gave the appearance of a "ball-throwing" game involving both the volunteer and two other figures, represented by animated characters.
The test subjects were told that real people were controlling the other two "people", and the game took the form of throwing the ball in turn between all three of them.
Of course, this was an elaborate hoax - there were no other human players, and the other characters in the game were controlled entirely by the computer.
At first, the game proceeded as it should, with the ball coming at regular intervals to the player controlled by the human volunteer.
However, after a while, the two computer controlled characters started throwing the ball only to each other, apparently excluding the test subject from the game.
It was at this point that the brain reactions were measured by the scanner.
The researchers noticed one key area of the brain "lighting up" on the scan when this happened.
This area, the anterior cingulate cortex, is already known to be associated with the brain's response to the unpleasant feelings linked to physical pain.
This was not just a frustrated reaction to not being able to play - researchers had already tested this by having a short period at the start of the game in which the controls appeared not to work properly.
The researchers wrote: "Evidence suggests that some of the same neural machinery recruited in the experience of pain may also be associated with social separation or rejection."
Dr Jaak Panksepp, from the Centre for Neuroscience, Mind and Behavior at Bowling Green State University in Ohio, said that feelings of social exclusion were powerful instincts in animals and humans.
He said: "The feelings induced by experimental games in the laboratory, are a pale shadow of the real-life feelings that humans and other animals experience in response to the sudden loss of social support.
"Psychological pain in humans, especially grief and intense loneliness, may share some of the same neural pathways that elaborate physical pain.
"Given the dependence of mammalian young on their caregivers, it is hard not to comprehend the strong survival value conferred by common neural pathways that elaborate both social attachment and the affective qualities of physical pain."