  In a wide variety of natural systems, closely-related microbial strains
coexist stably, resulting in high levels of fine-scale biodiversity. However,
the mechanisms that stabilize this coexistence are not fully understood.
Spatial heterogeneity is one common stabilizing mechanism, but the rate at
which organisms disperse throughout the heterogeneous environment may strongly
impact the stabilizing effect that heterogeneity can provide. An intriguing
example is the gut microbiome, where active mechanisms exist to control the
movement of microbes and potentially maintain diversity. We investigate how
biodiversity is affected by migration rate using a simple evolutionary model
with heterogeneous selection pressure. We find that the biodiversity-migration
rate relationship is shaped by multiple phase transitions, including a
reentrant phase transition to coexistence. At each transition, an ecotype goes
extinct and dynamics exhibit critical slowing down (CSD). CSD is encoded in the
statistics of fluctuations due to demographic noise -- this may provide an
experimental means for detecting and altering impending extinction.
