Jumping spiders defend themselves against aggressive spitting spiders with an unlikely resource: the ants that love to eat them.

According to new research published in the journal Behavioral Ecology and Sociobiology, the timid jumping spider (Phintella piatensis) uses the scent of weaver ants (Oecophylla smaragdina) as a secret weapon against the spitting spider (Scytodes sp). Yet in an extraordinary twist, the jumping spider is the favorite snack of the very ants it uses to protect itself.

This phenomenon, wherein a vulnerable species gains protection through a predator species capable of deterring other predators, has been documented before, but it is more common among birds than insects.

Spitting spiders, which can immobilize their prey by spitting on them from a distance, live on the same large, waxy leaves as the jumping spider. These aggressive spiders often attempt to build their nests right over the nests of the jumping spider. But Ximena Nelson of the University of Canterbury in New Zealand and Robert Jackson of the University of Canterbury report that when the jumping spider builds its nest near a weaver ant nest, the spitting spider will not approach it.

The researchers report that the spitting spider is warded off by a specific olfactory compound that the ants release, and that jumping spiders will chose their nest locations based on proximity to a weaver ant nest.

Yet the weaver ants love to eat the jumping spider.

To protect themselves from becoming ant food, the jumping spider has the ability to construct an unusually thick and tough web that the ants have difficulty penetrating. The spider also weaves itself what amount to swinging doors on its nesting capsule that can be used to make quick escapes from hungry ants.

"Nesting associations with territorial ants whereby the ant does not receive any benefit may be more common among arthropods than is currently appreciated," Nelson said. "We expect that a closer look at ant-other arthropod relationships will yield numerous examples similar to ours and provide a better understanding of the complexities of microhabitat choice and its ecological ramifications."