Crabs and lobsters have a tough time at the hands of humans. In most countries, they are excluded from the scope of animal welfare legislation, so nothing you do to them is illegal. The result is that they are treated in ways that would clearly be cruel if inflicted on a vertebrate.

This might in part be because they are so alien to us. It is hard to begin to imagine the inner life of a 10-legged, faceless creature with a nervous system distributed throughout its body. Worse still, crustaceans lack the headline-grabbing intelligence of the octopus. With only about 100,000 neurons in their nervous system compared with the octopus’s 500 million, crabs and lobsters are unlikely to set the ocean alight with their cognitive prowess. They are easy to overlook and difficult to empathise with.

Nevertheless, if you care about animal welfare, you should care what happens to crabs and lobsters. Consider live boiling. The animal often takes minutes to die, during which it writhes around and sheds its limbs. Crustaceans can be killed in seconds with knives, but most non-specialists don’t know the right technique. Electrocution using a ‘Crustastun’ takes about 10 seconds, and is probably as humane as it gets, but the expense of this device means it is hardly standard kitchen equipment. Some processing plants use them (and some UK supermarkets require their suppliers to do so), but many do not, and there is no legal requirement to stun. Crabs are often still, as one recent study put it, ‘processed in a live state’. ‘Processed’ here is a euphemism for ‘carved alive’.

Does any of this matter ethically? For many, the key question here is whether these animals are capable of feeling anything – whether they are sentient. If they feel nothing as they are boiled or carved alive, then ethical qualms about these practices seem as misplaced as they would be for vegetables. But if they do feel – if they are sentient – then they are cruel and inhumane.

So what is the reality? Are crabs and lobsters sentient or not? Can science settle the issue? Before we can address this question, it helps to be clearer about what we’re looking for. I will focus here specifically on the phenomenon of pain. There is much more to an animal’s subjective experience of the world and of its own body than pain alone – but pain is the aspect of sentience with the most obvious ethical consequences.

Animal welfare scientists define pain as ‘an aversive sensation and feeling associated with actual or potential tissue damage’. When they talk about pain, they mean pain in its most elemental, evolutionarily ancient sense – a feeling that might have some but not all of the aspects of pain in humans. In particular, to feel pain in this basic sense, it is not necessary to be self-conscious – to be aware of oneself as being in pain.

Do crustaceans feel pain in this basic sense? Over the past few years, a series of experiments by the biologist Robert Elwood and colleagues at Queen’s University Belfast has demonstrated impressively sophisticated behaviour in crabs. Here is one example. Hermit crabs live in shells vacated by other animals. They prefer some types of shell to others, and will often switch from a less-preferred to a more-preferred shell in the wild. Elwood drilled holes in the hermit crabs’ shells and poked electrodes through the holes to see how they would react to small electric shocks – not a pleasant procedure, but a necessary one to gain insight into their responses.

Unsurprisingly, crabs would sometimes vacate a shell, even a good one, if the shock became too severe. More surprisingly, the crabs traded off the quality of the shell against the intensity of the shock received within it. For a given intensity of shock, they’d be more reluctant to give up a high-quality shell than a low-quality one. This is known as a motivational trade-off. The crabs were balancing their need to avoid shocks against their other needs.

In another experiment, Elwood and colleagues found that shore crabs rapidly learn to avoid locations they associate with harmful experiences. The crabs were offered a choice of two dark shelters: in one, they received shocks; in the other, they did not. In general, crabs prefer to return to shelters that they have previously occupied. But after repeatedly receiving a shock in one of the shelters, the crabs were much less likely to return to it – a phenomenon known as conditioned place avoidance.

Motivational trade-offs and conditioned place avoidance are what I call credible indicators of pain – credible because they cannot be explained away as mere reflexes, and because they tie in with a reasonable theory about the function of pain for animals that feel it. The idea in the background here is that pain is a guide to decision-making. To make flexible decisions, animals need to be able to weigh the seriousness of an injury against other things they need. Sometimes fleeing is the right thing to do; sometimes carrying on as normal is the right thing to do; sometimes tending the injury is the right thing to do – it depends on the situation. Pain is the currency in which the need to stop, or the need to flee, is measured. When we find an animal making flexible decisions by integrating information about past or present injury with information about its other needs, that is a credible indicator of pain.

Is it conceivable that motivational trade-offs and conditioned place avoidance occur without any pain? Of course, but no one is suggesting that pain is conclusively established by these experiments. We are talking about credible indicators, not conclusive proof. If we demand conclusive proof, this will never be attained – not for any animal, not even for other human beings.

What should we do, then, in this state of uncertainty? I suggest a common-sense approach: apply a version of the precautionary principle. The precautionary principle was originally devised for environmental policy. It says, in effect: when you’re uncertain about the link between human actions and a seriously bad outcome, don’t let your uncertainty prevent you from taking effective precautions. The principle has been applied to environmental threats as diverse as climate change and neonicotinoids (or neonics), the pesticides linked to colony collapse in bees.

It should also be applied to the question of animal sentience. I have recently proposed the following ‘animal sentience precautionary principle’:

Where there are threats of serious, negative animal welfare outcomes, lack of full scientific certainty as to the sentience of the animals in question shall not be used as a reason for postponing cost-effective measures to prevent those outcomes.

In short: when the evidence is suggestive but not conclusive, give the animal the benefit of the doubt.

The phrase ‘lack of full scientific certainty’, taken from the 1992 Rio Declaration on Environment and Development, is, admittedly, far too vague. It does not specify the evidential standard that has to be met. This is why I have also proposed a specific, pragmatic standard: we should act to mitigate risks to animal welfare when there is at least one credible indicator of sentience in at least one species of the order of animals in question. The decapod crustaceans meet this standard. Arguably an even stronger case can be made for octopus, squid and cuttlefish, which already receive some protection in the European Union.

The phrase ‘cost-effective measures’ is also vague. So here is my specific, pragmatic proposal: when the evidential standard is met, we should bring the order of animals within the scope of animal welfare legislation in a way appropriate to their particular welfare needs. In the case of crustaceans, that means banning processing methods with a substantial risk of inflicting pain, such as live carving and live boiling.

To be clear, the precautionary principle is a guide to policy, not to individual action. In light of evidence of pain in crustaceans, you might feel it appropriate to stop eating them. That would be a reasonable reaction, but it isn’t entailed by my proposals, which are concerned with the law rather than with individual behaviour. What my proposals do entail is that decapod crustaceans deserve a basic level of legal protection.

We could wait for evidence to pile up, demanding more credible indicators in more species, while decapods continue to be ‘processed’ alive around the world. But there’s a good chance we’d regret our inaction, just as we might well come to regret our inaction over climate change and neonics. Alternatively, we could take precautions now. On climate change and neonics, it is common sense to act now to mitigate the risk of environmental disaster. Likewise, we should act now to protect decapods, to mitigate the risk of a continuing animal welfare disaster.