Ants don’t live in a very peaceful world. As there’s so many of them in one spot, they make a great target for e.g. predators and diseases. Furthermore, many ants fight amongst each other for things like foraging territories.
In Borneo, there’s a carpenter ant called Camponotus saundersi. This ant is under continuous attack from weaver ants because of foraging territories. Weaver ants are quite ferocious, and it might be very hard for the carpenter ants to fight the weavers off. This might be the reason for the carpenter ants to have evolved a very unique and interesting behaviour…they explode.
These ants have extremely enlarged mandibular glands full of a very sticky mixture. When they feel like they’re in big danger, they will contract and rupture their abdomen…spraying glue all over the attacker. This behaviour was discovered in 1974 by Ulrich Maschwitz, as the ants would even explode when they were touched with a forceps (which makes it quite hard to collect these ants!).
This explosive behaviour makes it very costly for the weaver ants to attack, as for each enemy they take out, they also lose one of their own!
Jones, Clark, Edwards, Davidson, Spande & Snelling (2004). The chemistry of exploding ants, Camponotus SPP. (cylindricus COMPLEX). Journal of Chemical Ecology 30(8): 1479-1492