Why do octopuses produce ink?

Octopuses are famous for their ink, but what do they use it for?

Octopuses and their cephalopod relatives, squid and cuttlefish, produce ink to evade, confuse and deter predators. Ink is ejected from a structure in the cephalopod’s body called an ink sac and is mixed with mucous before being funnelled into the water. The resulting stream can take on several forms, including the classic ink cloud, worm-like trails, and ‘pseudomorphs’. The last of these are ink streams that resemble the cephalopod releasing them  and might be intended to distract a predator from pursuing the real thing. The other forms could also work as distractions or for concealment, allowing the producer to escape.

Most cephalopods do not produce ink-containing toxins. Even so, experiments have shown that some fish are deterred by ink, perhaps due to its chemical composition. Cephalopod ink contains melanin (which is also in human skin), as well as cadmium, copper, lead and polymers that might have anti-cancer properties. Researchers have also discovered that the release of ink by one or more individuals can serve to alert other cephalopods to nearby threats, prompting them to jet away or adopt defensive behaviours before they become lunch.