Wires were attached to shells to deliver the small shocks to the abdomen of the some of the crabs within the shells.
The only crabs to get out of their shells were those which had received shocks, indicating that the experience is unpleasant for them. This shows that central neuronal processing occurs rather than the response merely being a reflex.
Crabs that had been shocked but had remained in their shell appeared to remember the experience of the shock because they quickly moved towards the new shell, investigated it briefly and were more likely to change to the new shell compared to those that had not been shocked.
Professor Elwood said: "There has been a long debate about whether crustaceans including crabs, prawns and lobsters feel pain.
"We know from previous research that they can detect harmful stimuli and withdraw from the source of the stimuli but that could be a simple reflex without the inner 'feeling' of unpleasantness that we associate with pain.
"This research demonstrates that it is not a simple reflex but that crabs trade-off their need for a quality shell with the need to avoid the harmful stimulus.
"Such trade-offs are seen in vertebrates in which the response to pain is controlled with respect to other requirements.
From the Upcoming ueue, submitted by .