An ancient reef once teeming with sea life has been unearthed in Namibia, Africa, and turns out to be the oldest animal-built reef ever found.

Dating back 550 million years, this reef - now located on dry land in Namibia - sheds light on how such formations were formed.

The coral-like, filter-feeding creatures, known as Cloudina, were the first animals to build structures similar to non-living reefs, which are created through the natural processes of erosion and sediment deposition.

Like modern-day corals, the primeval creatures excreted calcium carbonate, which cemented them to each other and helped grow the reef.

Scientists believe they built such superstructures to protect themselves from predators or to soak up nutrient-rich currents at a time when there was growing competition for food and living space.

"We have found that animals were building reefs even before the evolution of complex animal life, suggesting that there must have been selective pressures in the Precambrian Period that we have yet to understand," Professor Rachel Wood, Professor of Carbonate GeoScience at the University of Edinburgh, who led the study, said in a press release.

During the Ediacaran Period (part of the Precambrian Period), which lasted from about 635 million to 542 million years ago, all life lived in the sea, most with soft bodies until the emergence of Cloudina.

Findings from the study, published in the journal Science, support previous research that suggested environmental pressures caused species to develop new features and behaviors in order to survive. Through a process called biomineralization, Cloudina developed hard protective coats unlike any other marine creatures before it, believed to have sparked a boom in the biodiversity of marine ecosystems.

"All together it paints a picture of quite significant ecological complexity," Wood told Live Science.

The study was published June 26 in Science and was carried out in collaboration with University College London and the Geological Survey of Namibia. The work was supported by the Natural Environment Research Council, the University of Edinburgh and the Laidlaw Trust.