A swarm of ants scurrying over the ground may look like a relatively chaotic scene, but don't underestimate these very complex and social insects.

A new study by researchers in the UK has found that highly cooperative ants are capable of coordinating together to form a single entity – effectively uniting as one to become a "superorganism" when faced by a predator or threat.

"Ants react very differently, and in a coordinated fashion, to perceived predator attacks depending on their location," said Thomas O'Shea-Wheller from the University of Bristol. "Just as we may respond to cell damage via pain, ant colonies respond to the loss of individuals via group awareness and reaction."

To measure how this behaviour is demonstrated, the researchers simulated a range of different predator attacks on 30 migrating ant colonies. In each simulation, using almost military-sounding tactics, they picked off ant scouts at the colony's periphery, before separately removing worker ants toiling in the middle of the nest.

The colony was not amused. When the collective body of insects became aware that its scouting parties had been taken out, it withdrew its extended, foraging 'arms' that drew out from the centre and reassembled into a tight, defensive formation.

But once worker ants were then removed from the centre of the nest, the opposite effect happened. Sensing a new threat at the very heart of the colony, the ants scattered outward to find a safer location.

The researchers suggest that these findings, which are published in PLOS ONE, draw parallels with the nervous response systems of single organisms. They liken the colony's arms withdrawing to when you burn your hand on a stove and quickly yank it back, whereas the outward exodus from a central threat is what people might do if their house was on fire (not that any singular organisms can pull this particular trick off, scattering in all directions at once).

"Our findings lend support to the superorganism concept, as the whole society reacts much like a single organism would in response to attacks on different parts of its body," the researchers write. "The implication of this is that a collective reaction to the location of worker loss within insect colonies is key to avoiding further harm, much in the same way that the nervous systems of individuals facilitate the avoidance of localised damage."