Millipedes are slow and unarmoured against a determined predator, so their defence is chemical. Repugnatorial glands, arranged as one pair per body segment along the flanks, release a secretion when the animal is squeezed or disturbed. In Archispirostreptus and many related orders the active compounds are benzoquinones; some other millipede groups produce hydrogen cyanide from cyanogenic precursors instead.
The effect on human skin is discolouration and, with prolonged contact, blistering; contact with the eyes can cause serious irritation and has been reported to require medical attention. The coiling posture puts the hardened dorsal plates outward and the vulnerable legs and underside inward, so the animal presents armour and chemistry simultaneously.
Several primates, including capuchin and lemur species, have been observed deliberately rubbing millipedes into their fur. The behaviour is generally interpreted as using the benzoquinones as an insect repellent, though a sedative or intoxicant effect has also been proposed and the function is not settled.

