Аннотация:Tropical shallow marine metazoan reefs have been biodiversity hotspots throughout their history, where this high biodiversity is thought to originate within reefs themselves. Notwithstanding their importance, the evolutionary origin of this unique and complex ecosystem is unknown, as the ecological preferences of the first reef-associated metazoans have not been explored. The oldest known skeletal (calcified) metazoans occupied shallow carbonate platforms and were associated with reefs, including the late Ediacaran taxon Cloudina and earliest Cambrian archaeocyath sponges. We show through quantitative analysis of these metazoan occurrences from ca 547 to 521 million yoears ago (Ma) that most were only facultatively associated with reefs: Cloudina, and most species of archaeocyath sponges within the Siberian Platform metacommunity, were generalists in their substrate preferences. Archaeocyath species colonized both hard and soft substrates and variably occupied both open surface and cryptic reef locations within different ecological communities. There is, however, some evidence for ecological specialization through time via niche diversification in these reefs. The distribution of these communities was, in turn, controlled by long-term environmental changes, driven by sea level. Given the ecological benefits conferred to metazoans by forming a reef, we conclude that reef-building naturally emerges once a skeletal benthos capable of permanent attachment is present, but the distribution of reefs over evolutionary timescales is dictated by the availability of suitable environmental conditions.