In the crystal-clear shallows of Cape Town, South Africa, a dwarf sperm whale (Kogia sima) was recently filmed attempting to flee an aggressive seal by releasing a 'smoke bomb' of dark, ink-like fluid.

As the whale rushes away from its oncoming predator and towards the shore, its wake suddenly becomes clouded with a reddish-brown material straight from its intestine.

"This 'inking' behaviour has been documented before," cetacean acoustician Karlina Merkens told ScienceAlert, "but it has been observed very rarely, and probably never seen and recorded in shallow water like this before."

Dwarf sperm whales are shy creatures that usually inhabit the deep sea. They spend very little time at the water's surface and they almost never approach vessels. 

As a result, very little data has been gathered on them; but we do know that unlike other whales, these dolphin-sized creatures are known to use a 'squid-like tactic' when escaping from predators.

If dwarf sperm whales feel threatened, they can actually release more than 11 litres (3 gallons) of a dark, reddish-brown liquid from a sac in their intestine. And this can buy them time in their flight.

Unfortunately, the recent event in South Africa did not shake out in the whale's favour. Local news reports claim the sperm whale was extensively injured and weak when officials arrived, and a decision was made to euthanise it.

Some have since theorised that the whale became distressed and disoriented because the shallow water stopped its echolocation from working. But Merkens, who works for the United States National Oceanic and Atmospheric Administration (NOAA) told ScienceAlert she thought this was very unlikely. 

Instead, she argues, the echoes coming off of objects in the harbour were probably confusing for the animal because it had likely never encountered any substantial solid surface before.

"Add that 'noisy' environment to being attacked by an aggressive animal of approximately the same size and also the possibility of an illness that caused it to be in shallow water to begin with, and it is very reasonable to assume that this animal was so highly stressed and disoriented that it was simply unable to navigate safely in such circumstances," Merkens says.

The poor thing was in dangerous waters to begin with.