Swollen-thorn acacias in Central America keep a standing army. Pseudomyrmex ants live inside hollow thorns and are paid in nectar and in Beltian bodies, protein-and-lipid packets grown at the tips of the leaflets. In return they attack almost anything that lands on the tree.
Bagheera kiplingi lives there anyway. Analyses published in 2009 found that Mexican populations take about ninety per cent of their food as Beltian bodies, harvested by darting in, cutting one free and retreating, using the sharp vision and rapid movement of a jumping spider to stay ahead of the patrols. Nests are placed on older leaves that the ants visit less often.
The habit is not uniform. Costa Rican populations of the same species take considerably more animal prey, including ant larvae, which suggests the vegetarian diet is a local strategy rather than a fixed requirement of the species.

