Some large, grass-eating mammals, such as elephants, rhinos and camels, gather together not only when they eat, but also when they defecate.
The group poop, researchers have surmised, has several important functions.
One is hygiene, to prevent the emergence of new parasites; another is safety, to provide surveillance in numbers against any prowling predator.
But new evidence, turned up in the journal Nature's Scientific Reports, suggests the communal latrine has a much older history, and one that predates the mammals.
A team led by Lucas Fiorelli of the National Council of Scientific and Technical Investigation (CONICET) in Argentina report on a treasure trove of fossilised faeces in the northwest of the country.
They counted no less than 30,000 of faeces, ranging in size from 0.5 to 35 centimetres (0.2 to 14 inches) in length. In some spots, the ancient excreta piled up to 100 per square metre.
The faeces-counting may have been exhaustive, but it showed that going through the motions can sometimes bring rewards.
It turns out the communal latrine dates back to 240 million years, a whole 20 million years earlier than the previous record-holder.
And close examination of the faeces showed it was deposited by none other than members of the Dicynodontes, "megaherbivore" reptiles which lived cheek-by-jowl with early dinosaurs.
"This is the first evidence of megaherbivore communal latrines in non-mammal vertebrates, indicating that this mammal-type behaviour was present in distant relatives of mammals," says the paper.
Explore further: Unique entry complex discovered at Herodian Hilltop Palace