Female fiddler crabs have sex with their male neighbours in exchange for protection against wandering male intruders, say Australian researchers.

A team led by Patricia Backwell of the Australian National University report their argument in the Royal Society journal Biology Letters.

Both male and female fiddler crabs shelter in burrows, which they both must defend from intruders.

But while males have an extremely large claw that can be used as a weapon, female crabs have just two small feeding claws.

So how do female crabs defend their territory?

To answer this question Backwell and colleagues built on previous work showing that under certain circumstances, males will help protect a neighbouring male from an intruder.

Such "defensive coalitions" are rare in the animal kingdom and have so far only been demonstrated in two species of fiddler crab and a type of bird called a rock pipit.

Protecting a neighbour can be risky, leading to injury, loss of a claw and even death, and a male also risks having his own unattended burrow invaded while off protecting a neighbour.

However, team member and behavioural ecologist Michael Jennions says it's a case of better the enemy you know.

Once territory boundaries have been established with one neighbour, he says, it makes sense to avoid the chance of getting a larger, stronger and more troublesome neighbour.

Sexual politics

In their latest publication, the researchers report that males will also defend neighbouring females — apparently in return for sex.

The researchers first established the background mating rate of Uca annulipes fiddler crabs on mudflats in Durban Harbour, South Africa.

They found that most of the time females mate with a carefully chosen mate in his burrow.

But sometimes they are willing to mate with other neighbouring males, on the surface of the mudflat.

Jennions says given how fussy females normally are with their mate choice, there must be some benefit they get out of mating with the average male neighbour.

The researchers set a number of trials in mudflats in Mozambique to study whether a male would protect a female neighbour when confronted by an intruder.

They super-glued a tether to the shell of a crab, placing it near the entrance of a female burrow to simulate an intruder.

When the intruder was male, a neighbouring male rushed in to defend the female 95 per cent of the time (in 20 out of 21 trials), but when the intruder was female, protection only occurred 15 per cent of the time (in three out of 20 trials).

Protection took place regardless of the size of the intruder.

Jennions says it makes sense for a male crab to defend a female neighbour.

"Females are a weak neighbour and it's good to have a weak neighbour. In addition, you have the added bonus that as a male … you can mate with a neighbour if she's a female," says Jennions.

Jennions says the team does not know whether the male would stop protecting a female who refused to mate with him.

But it would be tricky setting up an experiment to find out, he says.