## Introduction

Coral reefs support the biologically most diverse marine ecosystems and have done so over substantial parts of earth history, starting in the Late Triassic, when scleractinian corals became prolific reef builders1. Mitigating the threats to modern coral reef ecosystems will thus benefit from a better understanding of the underlying causes in the rise and fall of ancient coral reefs2. Reefs, broadly defined as laterally confined limestone “structures built by the growth or metabolic activity of sessile benthic aquatic organisms”3 comprise a large array of constructional styles and biota, and grew in a variety of environments. The concept of ‘true reefs’ in ancient reefs derives from the constructional style and environment of recent tropical, shallow-water coral reefs. True reefs with a syndepositional relief and a rigid framework constructed by skeletal organisms are known since Cambrian times4 but occur alongside other reef types such as reef mounds, mud mounds and biostromes. There is a significant increase of both the relative and absolute abundance of true reefs over the Phanerozoic5. This trend may be caused by intrinsic (biological) factors as there are few significant correlations with earth system parameters such as temperature, sea level, or oceans chemistry5. Although hypothesized to play a major role6, the relative importance of biotic interactions in reef evolution is still poorly known. The evolution of crustose coralline red algae (Subclass Corallinophycidae Le Gall and Saunders7, hereafter referred to as ‘CCA’) may underline such interactions in an exemplary fashion. CCA play a key role in the construction of many modern coral reefs8,9,10 in several regards: CCA are not only primary producers and contributors of calcareous sediment but also often act as consolidators and binders of coral reefs. The algae can form a distinct ridge providing a surf-resistant reef crest and bind loose sediment11. Even though there are examples of true reefs that grow successful without this CCA ridge under wave-exposure12,13, CCA are still considered as ‘the glue that holds coral reefs together’9 in many cases. Another key factor for the success of modern coral reefs are grazing organisms such as echinoids and parrot fish, because they remove fleshy algae from the reef surface14,15. The evolution of grazers also led to an increased feeding pressure on CCA, followed by adaptive strategies of the CCA16. It seems plausible that this development also impacted a potential capacity of CCA to facilitate coral reef formation in the geological past. However, this hypothesis has not been assessed quantitatively until now.

There are hints for a long-term positive interaction between corals and CCA over geological timescales17. However, a finer temporal and taxonomic resolution and the inclusion of environmental parameters may explain if and why a potential importance of CCA for reef development varies over time. Using data from the PaleoReefsDatabase (PARED), a comprehensive compendium of geological and paleontological data of Phanerozoic reef sites as described previously18,19,20, we evaluate the role of CCA in coral reef development at the level of geological stages from the Early Cretaceous to the Pleistocene while considering additional factors such as ocean temperature and chemistry as well as interactions with relevant groups of grazing organisms. We test three hypotheses: (1) The probability of true reef formation is correlated with the presence of CCA reef cementers; (2) the capacity of CCA to reinforce coral reefs is linked to various oceanographic and ecological parameters; (3) the diversification of grazing organisms led to transient crises in the capacity of CCA to support true reef formation. Additionally, we highlight alternative explanations for the correlation between CCA occurrences and the formation of true reefs. This includes the impact of herbivore radiation on corals rather than on CCA directly and ecological niches for CCA provided by increased reef growth.

## Results

The general hypothesis that the occurrence of true reefs is strongly correlated with CCA as secondary reef builders is supported by the linear regression model (Fig. 1). Regression residuals are not auto-correlated suggesting that no further data treatment is required. (Supporting Information Fig. S1).

The temporal patterns of the investigated variables, proportions of true CCA-reefs, sea level, ocean temperature, CO2 concentration, species diversity of CCA, and the origin and diversification patterns of the grazer clades echinoids and parrot fish are visualized in Fig. 2. Four transient crises are evident, one between the Turonian and the Campanian, one in the Paleocene (Selandian–Thanetian), one in the Miocene (Serravallian), and the youngest one in the Pliocene (Zanclean–Piacenzian).

All environmental variables except grazers are correlated with each other (Table 1). The high values of correlation between potential explanatory variables hinder a quantification of independent effects in the subsequent analyses. The only exceptions are the origination and diversification patterns of grazers.

Stepwise model selection in a multivariate GLM selected the variables ocean temperature, grazers, and species diversity of CCA for the final model (Table 2) with reasonable goodness of fit measures (Table 3, Fig. S2). The evaluation of residuals shows that residuals are not significantly auto-correlated (Supporting Information Fig. S3). However, the high correlation among explanatory variables (Table 1) makes it impossible to separate the effects of CCA diversity and ocean temperature with confidence. Nevertheless, visualization of the GLM shows that species diversity of CCA is positively correlated with the presence of true CCA-reefs while higher ocean temperatures and the origination and diversification of grazers have negative effects (Fig. 3).

## Discussion

### The role of CCA as reef consolidators

We found a significant correlation between the proportion of reefs that contain CCA as secondary reef builders and the proportion of true reefs over the last 150 million years. Coral reefs can benefit from CCA in various ways. Relating to the reef ridge, the stony pavement made up by the algae protects the ridge from onrushing waves and also consolidates the reef flats behind the ridges11. With reference to the whole reef, CCA reinforce the structure created by corals, fill cracks, bind together much of the sand, dead corals and debris, and thereby create a stable substrate and reduce reef erosion22. Larval settlement, metamorphosis, and recruitment of several coral species is strictly determined by chemosensory recognition of specific signal molecules uniquely available in specific CCA23.

However, it has to be considered that there are modern reefs that cope with wavy, high-energy environments without the aid of CCA, as for example the Alacran reef in Mexico12. CCA are not the only possibility to add rigidity to a reef. Submarine lithification can be more important than CCA in creating calcite precipitates, especially when environmental and ecological conditions are unfavourable for the growth of CCA, e.g. because of the lack of light. Submarine lithification in the form of Mg-calcite precipitates exists in many forms, including cemented micritic crusts and infillings of cracks. Additionally, their respective carbonate sources may be abiotic24 or originate from a great variety of organisms, including reef fish25. Therefore, they do also play an important role for the structural integrity of coral reefs24. CCA abundance may benefit from reef growth in terms of ecological niches provided, additionally increasing the positive correlation. We thus suggest that the significant correlation between the proportion of reefs reinforced by CCA as secondary reef builders and the proportion of true reefs can be interpreted as a mutual benefit. On the one hand, the presence of CCA can add stability to coral reefs, especially when the reef ridge is exposed to heavy wave action. On the other hand, sufficient reef growth can be a prerequisite for a larger abundance of CCA. A shift towards one side in this mutual dependence is subject to the particular features of each reef, as for example if CCA rather benefit from the shelter of crevices in reefs with high grazing pressure or if corals rather benefit from the presence of CCA at sites of intense wave exposure.

### The physicochemical parameters ocean temperature, sea level, and RCO2

CCA occur worldwide from the tropics10 to polar latitudes26 and temperature is one of the primary determinants in their geographical distribution, and the boundaries of their biogeographical regions are associated with isotherms27. Therefore, the identification of ocean temperature as an important driver of CCA reefs is reasonable. Aguirre, et al.28 reported that throughout the history of CCA, species richness broadly correlates with global mean palaeotemperature. However, only the diversity of the order Sporolithales varies positively with temperature, whereas the diversity of the order Corallinales varies negatively with temperature. Accordingly, the warm-water Sporolithales were most species-rich during the warm Cretaceous, but they declined and were rapidly replaced by the Corallinales as Cenozoic temperatures declined. In recent environments, members of the Sporolithales are confined to greater water depths while in euphotic reefs, they do not play a role as reef stabilizers28 and occupy only cryptic habitats sensu Kobluk29, i.e. cavities that serve as well-protected habitats and are not subject to the full spectrum of environmental and biotic controls that exist on the reef surface28. The wave-pounded intertidal algal ridges are built predominantly by Porolithon onkodes (Heydrich) Foslie 1909, P. gardineri (Foslie) Foslie 1909, P. craspedium (Foslie) Foslie 1909, and Lithophyllum kotschyanum Unger 1858 in the Indo-Pacific. In the Atlantic, the main reef reinforcers are Porolithon onkodes (Heydrich) Foslie 1909 and Lithophyllum congestum (Foslie) Foslie 1900. All these species belong to the ‘cool’-water adapted Corallinales. Thus, the increasing capacity of CCA to stabilize coral reefs is in line with the general trend of decreasing ocean temperatures.

A change in sea level does not impact the capacity of CCA to reinforce coral reefs, likely because sea level changes measured on the level of geological stages have no effect on reef formation5. On shorter time scales, sea level is expected to influence the formation of coral reefs, but probably not the CCA’s reef enforcing capacity. We conclude this because the environmental tolerances of CCA in terms of sea level fluctuation are much wider than those of reef corals. Most CCA species appear uniquely tolerant of aerial exposure10. Additionally, many CCA are very well adapted to changes in salinity and especially to low photon irradiances30. The environmental tolerances of reef corals are narrower31,32.

Considering our assumption that there is a mutual relationship between the presence of CCA and the growth of true reefs, another reason might be that one of the most important genera in modern coral reefs, Acropora Oken, 1815, is well adapted to cope with rapid sea-level changes. First observed as an important reef builder in the Oligocene33, Acropora has become a dominant reef builder from the Pleistocene until today, when sea-level fluctuations increased in rate and magnitude34. Indeed, there is a temporal overlap between the first decline in the fraction of CCA reefs—between the Turonian and the Campanian—and a maximum in sea level. Despite this, sea level is not selected as a relevant explanatory variable for the fraction of CCA reefs by the GLM because the relationship between the fraction of CCA reefs and sea level varies inconsistently throughout entire time series of the analysed 150 million years. While the decline in the fraction of CCA reefs may additionally be linked to an increase in temperature before and a significant drop in CCA diversity during the period with a low fraction of CCA reefs, data of the analysis are not suitable to conclusively identify the driver for this particular CCA crisis.

For the entire time series, RCO2, was identified by the model as a minor driver, which may be explained by the fact that an increase of atmospheric pCO2 has only little to no impact on mean ocean surface pH on timescales exceeding 10,000 years35. A plausible reason is that slow rates of CO2 release lead to a different balance of carbonate chemistry changes and a smaller seawater CaCO3 saturation response. This is because the alkalinity released by rock weathering on land must ultimately be balanced by the preservation and burial of CaCO3 in marine sediments. The burial is controlled by the CaCO3 saturation state of the ocean and therefore, the saturation is ultimately regulated by weathering on long time scales, and not by atmospheric pCO2. The effect of weathering on atmospheric pCO2 is much weaker than the effect of weathering on ocean pH. The much stronger effect of weathering on ocean pH allows pH and CaCO3 saturation to be almost decoupled for slowly increasing atmospheric pCO235.

### The influence of CCA species diversity

The quantification of CCA species diversity in the geological past is associated to a number of challenges. While for recent CCA the extensive use of molecular phylogenetic methods resolved the four orders (Corallinales, Hapalidiales, Sporolithales, and Rhodogorgonales) currently recognized in the subclass Corallinophycidae as monophyletic lineages36,37, we have to rely on morphological characters since molecular methods are not available for the identification of fossil CCA. Because CCA show a pronounced phenotypic plasticity depending on environmental factors, their taxonomic identification depends on morphological characters like conceptacles (i.e. spore chambers) and the arrangement of cells in different areas of the thallus, features often not adequately preserved in fossil CCA. This has led to a great number of fossil CCA taxa that have been described on the basis of only a few anatomical characters of doubtful taxonomic value38. The inclusion of such taxa precludes fully reliable diversity estimations. To circumvent such problems, we used rarefied species data reviewed by experts on fossil CCA taxonomy28.

Our results show that high CCA diversity is linked to a higher abundance of CCA in true coral reefs. This might seem to contrast with the fact that in modern reefs, the wave-pounded intertidal algal ridges are built predominantly by only a few species while the ones making up the majority of diversity have a cryptic, hidden mode of life protected from full or direct exposure to major physical environmental factors and therefore do not contribute significantly to reef stabilization. However, if several CCA species were contributing to the same ecosystem function, a higher species diversity may have buffered reef systems from losing all species associated with the key function of supporting reef development39. As discussed in detail in the next section, the abundance of CCA in true reefs was transiently reduced four times since the Early Cretaceous. Except for the earliest crisis, this was likely caused by the origin and diversification of echinoids and parrot fish, prominent groups of bioeroding organisms that denude CCA. However, the CCA-coral reef system successfully recovered all times. We argue that this was supported by functional redundancy of CCA, because a diverse group of abundant species with a wider range of responses can help absorb disturbances39. This redundancy of responses to events among species within a functional group—the reef cementers—is an important component of resilience and the maintenance of ecosystem services. The amount of CCA biomass is critical in terms of the cementing capacity. Multi-species community models40 have shown that with consecutive native species’ extinctions at high diversity levels, species extinction usually only leads to a slight decrease in the total biomass of the native community. However, when starting from a lower initial diversity, a few consecutive species extinctions cause a relatively large biomass loss that ultimately leads to collapse. It should also be stressed that sometimes single species are responsible for the functioning of an ecosystem (i.e., keystone species), even if the ecosystem features a generally high biodiversity. Therefore, such ecosystems will decline if this key species is removed41.

Experiments with plants in rangelands42 showed that functional diversity maintains ecosystem functioning. At heavily grazed sites, some species dominant in the ungrazed communities were lost or substantially reduced. In four out of five cases, the minor species that replaced these lost ones were their functional analogues. Accordingly, we suggest that formerly less dominant but functionally analogous grazing-tolerant species increased in abundance and contributed to the maintenance of ecosystem functions. CCA species removed or reduced in biomass by grazing pressure can be replaced in terms of their ecosystem service, i.e. reef cementation, by other CCA that are better adapted to grazing.

This implies that in recent coral reef environments, areas with high CCA diversity—potentially including species occupying cryptic habitats—are more resilient against disturbance. Because the skeletal mineralogies of CCA vary considerably among species43, this resilience possibly applies also to future ocean acidification.

### The evolution of herbivory and transient reef crises

The data reveal four crises in the abundance of CCA within true reefs, during the Cretaceous (Turonian–Campanian), the Paleocene (Selandian–Thanetian), the Miocene (Serravallian), and the Pliocene (Zanclean–Piacenzian). The reason that the timing of the Paleocene crisis differs from the known Paleocene–Eocene crisis20 might be that our study focuses on the number of true reefs, while the Paleocene-Eocene crisis is expressed by a change in cumulative metazoan reef volume. Except for the first one, all crises observed here occurred synchronous with pronounced evolutionary events in clades of grazing organisms. Cementing and binding is the main function of CCA in the facilitation of true coral reefs. The decline in CCA abundance during the Selandian–Thanetian corresponds with a marked increase in the rate of morphological evolution in echinoids (Fig. 2). This includes major shifts in lifestyle and the evolution of new subclades in this group44, with a net trend towards improved mobility and feeding ability also on CCA16. Regarding the Serravallian and Zanclean–Piacenzian crises, echinoids appear to play a very minor role as their evolutionary rates constantly decreased over time44. However, another important clade of coralline grazers, the parrot fishes (Scarinae Rafinesque, 1810) may have become major players45. Although reef-grazing fish have existed for nearly 400 Ma, specialized detritivores feeding on macroalgae have only been known since the Miocene46. This is also in line with the radiation of acroporid corals since the mid Miocene47, whose branched morphologies create interstitial niches for parrot fish but also for cryptic CCA species. The parrot fishes (Scarinae) first appeared in the Serravallian45, which may have caused the third crisis in CCA reef cementing capacity. The lineage diversification of Scarinae was most pronounced during the Zanclean-Piacenzian, which we deem responsible for the third crisis.

The abundance of CCA in true coral reefs recovered relatively fast after all crises probably due to morphological adaptations developed within the CCA. Experiments have shown that echinoids are able to graze tissues to depths averaging 88 µm16, which is critical for CCA with thin crust morphologies. The resulting decline of thin crust morphologies led to the occupation of niches by branching CCA16. The twig-like morphologies of branching CCA prevent echinoids from denuding CCA thallus and confine this process to the tips of the branches. CCA are able to transfer nutrients within their thallus16. Therefore, these superficial grazing wounds can be rapidly healed if sufficient nutrient reservoirs are present in other, ungrazed parts of the algae. Meristems and conceptacles engulfed in the thallus may be another adaptation pertinent to the relatively low impact of echinoid grazing, as this is a plausible strategy to protect the reproductive and growth structures of the CCA. The more intense grazing pressure exerted by the parrot fishes, which bite CCA to an average depth of 288 µm16 and are able to eat the tips of branched CCA48 may have resulted in a greater abundance of CCA with very thick crusts. Thick-crust CCA possess larger nutrient reservoirs making them capable to recover also from grazing exerted by parrot fishes. All these adaptations and their development are congruent with the origination and diversification of the grazer clades as already outlined in other studies16,49,50. Today and potentially already during the geological history, CCA did not only successfully adapt to various grazer clades but even required the grazing pressure to stay free of epiphytes49. Here we show for the first time that the process of grazer evolution may also have affected the potential capacity of the CCA to reinforce coral reefs for three times during the geological past.

### Future implications for the capacity of CCA to reinforce coral reefs

As it concerns some of the most important biodiversity hot spots on our planet2, the potential future impact of the ongoing global change on the capacity of CCA to reinforce coral reefs should become a focal point of reef research. Despite the implementation of numerous mesocosm and aquaria experiments51,52,53, long-term data in the magnitude of months on CCA responses to modified environmental parameters are still sparse. Also, the change from ambient to modified parameters (e.g. pCO2, temperature) happens much faster than at natural rates.

The impact of elevated pCO2 on CCA depends on the rate of change. While fast rates are critical, slow pCO2 increase may even result in increased net calcification at moderately elevated pCO2 levels54. However, this comes at the cost of structural integrity of the CCA skeleton which, in turn, makes the CCA likely more susceptible to bioerosion. Bioerosion by echinoids and parrot fishes is beneficial to CCA at the present state, as it removes fast growing fleshy algae and other epiphytes49, but nothing is known about the future of this interaction when the integrity of the CCA skeletons is altered. Additionally, it has been shown that elevated pCO2 levels accelerate sponge reef bioerosion55,56,57. Therefore, a combination of increased bioerosion rates affecting corals and CCA might lead to strongly deteriorated conditions for coral reef formation. As outlined above, a greater CCA diversity might also increase their resilience against ocean acidification because of the great variety in skeletal mineralogies.

Regarding elevated temperatures, the outcome for CCA is unpredictable. Depending on the examined species, elevated temperatures affect CCA primary production in different ways: some species show no or negligible response30, some change their skeletal chemistry in terms of dolomite concentration58, and others respond with strongly impaired germination success59 or declining skeletal densities60. Due to the positive influence of cooler temperatures on CCA’s abundance in true reefs detected in our study, elevated temperatures will likely have a negative outcome but also here, the rate of change might be similarly important as the magnitude.

To estimate the future of CCA’s potential to facilitate coral reef growth in the face of global change, we encourage long term experiments—preferably in near-natural mesocosm studies—including the main reef stabilizing CCA species.

## Materials and methods

While CCA have existed at least since the Silurian61, pre-Cretaceous occurrences are scarce. We downloaded data on all reefs occurring from the earliest Cretaceous (Berriasian stage, 145.5 Ma) to the Late Pleistocene (0.01 Ma) and having corals as the main reef builders from the PaleoReefs Database (PARED, www.paleo-reefs.pal.uni-erlangen.de) in May 2018. The 736 Cretaceous to Pleistocene coral reef sites were grouped in 33 geological stages (following the International Commission on Stratigraphy62) representing 145 million years of Earth history with information on reef diversity and environmental parameters.

The data in PARED contain information on the constructional style of each reef, distinguishing between true reefs, reef mounds, mud mounds or banks, and biostromes. True reefs are those where skeletal organisms in growth position form a dense, rigid framework. Reef mounds share abundant skeletal organisms with no evidence for a rigid skeletal framework. Mud mounds or banks predominately consist of carbonate mud, often of microbial origin. Biostromes consist of skeletal organisms but there is no syndepositional relief19. We focus on coral reefs in the constructional style of true reefs, because we hypothesize that their rigidity and three-dimensionality depend on the CCA’s cementing capacity. The data in PARED also contain information on the secondary reef builders and we only asserted a significant functioning as reef cementers to the CCA when they were listed as secondary reef builders within the particular coral reef. For each geological stage, we consequently tabulated the absolute numbers of four reef types:

All reefs:

all reefs in this study, regardless of their constructional style and if they have CCA as secondary reef builders.

True reefs:

reefs with the constructional style of true reefs, but regardless if they have CCA as secondary reef builders or not.

CCA-reefs:

reefs that have CCA as secondary reef builders, but regardless of their constructional style.

True CCA-reefs:

reefs both features apply for: the constructional style of true reefs and CCA as secondary reef builders.

From these data, we calculated the proportions (mean ± one standard error) of true reefs, CCA-reefs, and true CCA-reefs for each geological stage by dividing the number of reefs of each type by the number of all reefs (Table 4). The standard error was calculated using the equation

$$SE= \sqrt{\frac{p\left(reef \,type\right)*(1-p\left(reef \,type\right))}{number \,of \,reefs}}$$

where p(reef type) is the calculated proportion of true reefs, CCA-reefs, and true CCA-reefs, respectively.

Our analyses aim to identify the environmental parameters, which are crucial for the capacity of CCA to facilitate the formation of true reefs. As potential explanatory variables, we explor sea level, ocean temperature, CO2 concentration, species diversity of CCA, and the origin and diversification patterns of the grazer clades echinoids and parrot fish. Information on sea level represents the relative sea level based on ocean volume change as mean value per geological stage63. Temperature data derive from the oxygen isotope dataset published by Veizer and Prokoph64. CO2 concentration for focal time periods (mean values per stage) is expressed relative to the current level (RCO2 multiproxy model; Berner and Kothavala65). Data on CCA diversity represent rarefied species diversities per stage28.

Data on echinoids are from Hopkins and Smith44 and represent rates of morphological evolution, which are measured as the mean number of character changes per lineage per million years. To quantify the diversification rates of herbivorous parrot fish, we used lineage-through-time (LTT) estimates in a dated phylogeny (Choat et al.45, Fig. 1). This phylogeny was obtained by analyses of three loci (16S, control region, S7I1) and comprises 16 species of the genus Chlorurus Swainson, 1839 (excavating feeding mode), 45 species of Scarus Forsskål, 1775 (scraping feeding mode), and two species of Hipposcarus Smith, 1956 (scraping feeding mode), all belonging to the family Labridae Cuvier, 1816. Testing the hypothesis that novel herbivore characteristics influence the capacity of CCA to facilitate the formation of true reefs, we distinguished background intervals from intervals in which distinct increases in character change or lineage origination occurred (parameter ‘grazers’ with values 1/0). All environmental parameters are compiled in Table 5.

We performed all statistical tests in R version 3.5.266 and removed all stages containing missing values in any parameters (Berriasian to Barremian, Selandian, and Gelasian) before analyses. We tested the general hypothesis that the occurrence of true reefs is strongly linked to CCA as secondary reef builders using a linear regression model between the proportions of true reefs and the proportions of CCA-reefs and tested the regression residuals for autocorrelation.

Prior to further analysis, we tested all explanatory variables for collinearity. We then assessed the influence of the environmental parameters on the coral-coralline interaction by implementing multivariate analyses (generalized linear models, GLM). As the dependent variables represent proportions (percentage of true CCA-reefs relative to all reefs), we implemented GLMs with a binomial error distribution (logit-link function). The binomial error distribution for percentage values has the advantage to account for the fact that a particular percentage value is more accurate if it is based on a larger number of observations (here the number of reefs). We used stepwise model selection based on a version of the Akaike information criterion (AIC, which is used in statistics), that has a correction for small sample sizes (AICc) to estimate the relevance of different environmental parameters. We quantified model performance using different goodness of fit measures (Nagelkerke’s pseudo-R2, Mc Fadden’s pseudo-R2, maximum likelihood pseudo-R2), tested model residuals for autocorrelation and visualised the model predictions.