12/02/2013 01:14 pm ET Updated Jan 23, 2014

Prehistoric 'Toilet' Unearthed In Argentina Linked To Homely Megaherbivore (VIDEO)

It's being called the world's oldest public toilet.

Researchers announced in a study this week the discovery of a prehistoric communal latrine filled with thousands of pieces of fossilized animal poop.

Unearthed in Argentina, the latrine was used about 240 million years ago by Dinodontosaurus, a megaherbivore that LiveScience likened to a cross between a rhinoceros and the demon dogs from "Ghostbusters."

(Story continues below)

dinosDinodontosaurus turpior, a big dicynodont or mammal-like reptile from Middle Triassic of South America and (possibly) Germany.

Communal latrines are areas where animals return repeatedly to poop, creating dung heaps. While such sites have been linked to mammals, this is the first time scientists have found evidence of communal latrines used by non-mammal vertebrates.

The team discovered the prehistoric poop two years ago while digging in northwestern Argentina, LiveScience reported. In total, eight separate latrine areas were discovered, some holding as many as 94 fossil poops for every 10 square feet. Some pieces of fossilized feces -- which scientists call coprolites -- measured a foot in diameter. What poop!

Why the common pooping area? A communal latrine can serve as a way to mark territory, and it can help prevent the spread of parasites.

"Firstly, it was important to avoid parasites -- 'you don't poo where you eat,' as the saying goes," researcher Dr. Lucas Fiorelli, of the Centro Regional de Investigaciones Científicas y Transferencia Tecnológica, told the BBC. "But it's also a warning to predators. If you leave a huge pile, you are saying: 'Hey! We are a big herd. Watch out!'"

Fiorelli plans to continue investigating the dig site, as well as the dung, according to LiveScience. The poop alone may give researchers an idea of what kind of plants lived in the area 240 million years ago.

The study was published online in Scientific Reports on Nov. 28, 2013.