In the lower Ordovician period, 480 million years ago, many trilobites died strangely on the seafloor.
Their fossils have recorded it: nose to bottom, in orderly lines, their long spines touching each other - as though carefully queuing, or painstakingly trekking from one location to another.
Why they were so arranged has long been a puzzle. It's too orderly, and too widespread, to likely be random chance. Now a new analysis proposes an answer.
The way the arthropods died, buried by sediment, suggests storms - implying that collective migratory behaviour is triggered by disturbances in their environment.
Many animals today exhibit collective and social behaviours - including arthropods. You're probably immediately thinking of the eusociality of colony insects such as bees, ants, and termites, but other arthropods - like spiders, and caterpillars - look after each other too.
But how and why collective behaviour evolved is still quite murky, since examples in the fossil record are relatively sparse.
Then, around 10 years ago, palaeontologists found a previously unknown species of arthropod from the Lower Cambrian (541 to 485 million years ago) in a peculiar strongly linked line.
It was, they said, indicative of collective behaviour - either migratory, or related to reproduction. But analyses to date have left out important information, such as a survey of the sedimentary environment in which they were buried.
Now, geologist Jean Vannier of the Université de Lyon and an international team of colleagues have described several such queues of a trilobite called Ampyx priscus, found in the Tremadocian Fezouata Shale Lagerstätte near Morocco.
These trilobites had long spines, one at the front, and two at the back of their bodies, that may have been sensory organs for navigating the perilous oceans.
And the team believes they have hit on a reason for the animals' collective behaviour.
"[We] show that these alignments of trilobites do not result from passive transportation and accumulation by currents but from a collective behaviour," the researchers wrote in their paper.
"Ampyx priscus was probably migrating in groups and used its long projecting spines to maintain a single-row formation by physical contacts possibly associated with mechano-receptors and/or chemical communication."
Their analysis found that the sediments in which the trilobites were buried is consistent with the sediments stirred up and deposited by storm-driven waves - in sufficient quantities to bury lines of trilobites, yet not strong enough to carry them away.
Thus, having been entombed in a layer of seafloor, the trilobites expired as they were, either by poisoning with hydrogen sulphide being stirred up in the storm, or simple suffocation.
The tight formation, the contact with spines, the storm-triggered migration, all have something in common with a modern-day species - the spiny lobster (Panulirus argus). In the autumn, thousands of lobsters line up in single-file queues, each individual's antennae in contact with the tail of the lobster in front.
It's thought that environmental changes - such as autumn storms - trigger neurohormonal changes in the lobster that induce the queuing behaviour so that they can migrate safely to deeper waters unaffected by storms.
The physical contact is thought to reduce drag as the animals scuttle across the seafloor.
The trilobites were blind, which means they could have had other reasons for maintaining physical contact.
But, generally, the parallels with lobster behaviour present a pretty compelling case that the trilobites' collective behaviour was likewise environmentally triggered.
Alternatively, they could have been on a seasonal migration to a breeding or spawning ground.
Whatever the reason, it's strong evidence that collective behaviour was already thriving nearly half a billion years ago.
"Ampyx shows how a 480-million-year-old euarthropod may have integrated its neural complexity into a temporary collective behaviour related to seasonal reproduction or triggered by environmental cues," the researchers wrote.
"Collective behaviour associated with communication and recognition systems probably evolved through natural selection as the Cambrian radiation proceeded ... Improving the chances of reproduction and survival to environmental stress are among the advantages that such behaviour may have conferred to euarthropods."
The research has been published in Scientific Reports.