Reef-like carbonate structures of one form or another have existed on earth for at least 2.7 billion years. The first reef-like limestone accumulations (excluding microbial carbonates), found in Proterozoic rocks the world over, were simple structures formed by stromatolites, hemispherical mounds of what were probably blue-green algae that entrapped fine sediment much as stromatolites do today. The first reef-like structures of animal origin were built by archaeocyath sponges of the Lower Cambrian (530-520 million years ago). What reef-building there was after the extinction of the archaeocyaths was mostly due to cyanobacteria, stromatolites and some coral-like Anthozoa, all growing in shallow protected waters and containing abundant trilobites together and a wide diversity of molluscs.Late Cambrian ecosystems persisted into the Middle Ordovician, when complex algae and invertebrate reef communities became widespread and reef biota greatly diversified. Stromatoporoid sponges and tabulate corals radiated at this time. Rugose corals first appeared in the Middle Ordovician and rapidly increased in number and diversity. Thus, algal communities were largely replaced by communities of skeletonised metazoans. By Late Ordovician, colonial rugose and tabulate corals had greatly diversified in shallow water and formed coral patch reefs, along with stromatoporoids other sponges and calcarious red algae. These reefs had little wave resistance and did not form solid platforms although stromatoporoids and tabulate corals formed massive colonies several meters diameter. These are the oldest-known reef coral communities and were possibly the outcome of symbiotic animal/algal associations. For at least 150 million years different combinations of these algae, sponges and corals built reefs around the tropical world. Silurian reefs became abundant and diverse and some reached massive proportions, the first truly wave-resistant carbonate platforms. In the Middle to Late Devonian, reefs reached maximum development for the Paleozoic. What remains today of these reefs are sometimes of enormous size and have the full range of structural characteristics of modern reefs. They had a high diversity of frame builders including microbialites, calcifying cyanobacteria, stomatoporoid and other sponges as well as tabulate and rugose corals. They also contained a diversity of other fauna and flora, perhaps comparable in diversity to modern reefs. Latest Devonian reefs are relatively rare and throughout the entire Carboniferous most reef-like constructions were relegated to relatively deep water. This was an interval of great climatic upheavals, sea-level fluctuation, and low ocean temperatures, all probably contributing to environments hostile to reef development. During the Late Carboniferous to Early Permian, phylloid (leaf-like) algae so completely dominated would-be reef substrates that most reef biota may have been displaced. Late Permian reef-like structures are characterized by frondose bryozoans, a wide range of sponges, algae, and encrusting tube-like Tubiphytes (of unknown taxonomic affinity), all with little cementation. Corals were uncommon everywhere. The causes of the end-Permian extinctions are illusive, but as far as reef biota are concerned they were probably the result of ocean acidification and anoxia due to extensive volcanism. It has been estimated that 80-95% of all species became extinct. Among these were all corals.