Appendix S1 Spatial autocorrelation analysis Model Structure —The standard Gaussian random fields model has the following form: y ( x) ( x) S ( x) . (eqn S1) (x), the mean component, is simply a linear function of the putative predictor variables (reef area, temperature, etc), as in a standard linear regression. The residual variation is divided into a non-spatial component, , and a spatially-autocorrelated component, S(x). S(x) is thus a function of the spatial distance separating locations. There are a variety of functions that are used to model this component of the residual variation. We initially selected a function on biological grounds. Specifically, on an arithmetic scale, species ranges exhibit a “hollow curve” shape, with most species having small ranges, and a rapidly diminishing fraction of species having progressively larger ranges. Because the degree of spatial autocorrelation between two sites should scale with fraction of species whose ranges are large enough to encompass both sites, we chose an exponential decay function for spatial autocorrelation because it shares this hollow-curve shape. We then confirmed our choice by using AIC to compare its fit with several of the standard alternatives (matern, gaussian, spherical, powered-exponential, cubic, cauchy) in a procedure analogous to that used in our selection of best area, energy, and mid-domain variables (see Methods). This analysis indicated that a model with exponentially-correlated function’s fit was comparable to, or better than, each of these alternatives. For the two functions (matern and cauchy) that exhibited comparable fit to the exponential function (AIC<2), we repeated the entire model selection procedure using these two functions instead of the exponential: in both cases, MDE + area was selected as the best model, consistent with the results using the exponential model. Relationships Among Predictor Variables — We examined correlation coefficients to assess the degree of collinearity among the alternative explanatory variables. These analyses confirmed that all correlations were weak to moderate (Spearman’s rank correlation; mean SST vs. reef area: = 0.49; mean SST vs. MDE: = -0.7; area vs. MDE: = -0.49). These values suggest that a model selection approach that is relatively robust to collinearity should be used (see Methods), and that the results should be interpreted in light of the potential biases induced by collinearity (see Discussion). Alternative Model Selection Procedure —An alternative to AIC-based model selection (presented in the text) is model selection based on Likelihood Ratio statistics. This approach yielded exactly the same conclusion as the AIC-based analysis: for both corals and fishes, the best model included area and MDE, but not energy (Fig. S1). Figure S1 A flow diagram of model selection based on Likelihood Ratio statistics, comparing the same models as those compared by AIC in Table 2. MDE – mid domain effect; Reef – reef area; SSTM – mean sea surface temperature. Values on arrows represent the chi-squared statistic when comparing the two alternative models connected by the arrow. Asterisks indicate levels of significance (*** p<0.001; ** p<0.01; * p < 0.05); the arrow indicates the direction of preference, i.e. it points to the favoured model. Solid lines indicate that the more complex model is significantly better (at =0.05); dashed lines indicate that the more complex model is not significantly better (in which case the simpler model is preferred). For both fishes and corals the best-fit model (in a circle rather than square) contains Reef area and MDE, but not the energy variable, in agreement with the model selection based on AIC.