Fossilized poo dropped by ancient rhino-like creatures gives insight into their diet and are part of what may be the world's oldest-known public toilet.

Today, "elephants, antelopes, and horses" have a designated public area to leave their droppings, this discovery shows animals engaged in this practice 220 million years ago, the BBC reported. Having a communal dropping area can help reduce the spread of parasites.

Argentinian researchers found the dropping across seven sites in the Chanares Formation in La Rioja province; some of the ancient droppings were as long as 15 inches.

"There is no doubt who the culprit was," Doctor Lucas Fiorelli, of Crilar-Conicet, who made the discovery said, the BBC reported. "Only one species could produce such big lumps - and we found their bones littered everywhere at the site."

The dinosaur was called Dinodontosaurus; it walked the Earth during the Triassic period and closely resembled a rhinoceros.

The piles of dung served other purposes other than sanitation.

"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 said.

The team said the ancient "coprolites" were like looking into a time capsule.

"When cracked open they reveal fragments of extinct plants, fungi, and gut parasites," Martin Hechenleitner, a fellow author on the study, said. "Each poo is a snapshot of an ancient ecosystem - the vegetation and the food chain. This was a crucial time in evolutionary history. The first mammals were there, living alongside the grandfather of dinosaurs. Maybe with these fossils we can glimpse into the lost environment which gave rise to the dinosaurs."

The research team plans to conduct future excavations on the site, Discovery News reported.

"In the formation, you have no record of plants, only animals," Fiorelli said, Discovery News reported. "Now, with the coprolite, you can know about the paleobotany of the formation."

The findings were published in the journal Scientific Reports.