Crabs feel pain when they are boiled and would remember it if only they could escape the pot, scientists believe.
Research has shown that when hermit crabs are given small electric shocks, they try to avoid being zapped again.
The finding could have important implications for the food industry, where many chefs boil crabs, lobsters and prawns alive in the belief that they are impervious to pain.
Hermit crabs appeared to suffer pain when given electric shocks. It has large implications for the food industry
The study, carried out at Queen's University Belfast, focused on hermit crabs, which protect their fragile bodies with empty seashells.
When small electric shocks were delivered to their abdomens, some of the crabs moved out of their shells.
With less powerful shocks the crabs remained inside, but when a new shell was offered they were more likely to switch homes than crabs that had not received a shock. This suggested that they remembered the earlier pain and wanted to get away from it, the journal Animal Behaviour reports.
Professor Bob Elwood, one of the researchers, said: 'Potentially a very large problem is being ignored. Legislation to protect crustaceans has been proposed but it is likely to cover only scientific research.
A number of chefs still boil lobsters alive
'Millions of crabs are caught or reared for the food industry, but there is no protection for them as the presumption is that they cannot experience pain.
'With vertebrates we are asked to err on the side of caution, and I believe this is the approach to take with crustaceans.'
Previous research has shown that crabs have personalities, with some facing challenges head-on while others retreat into their shell at the first sign of trouble.