  The margins within the geographic range of species are often specific in
terms of ecological and evolutionary processes, and can strongly influence the
species' reaction to climate change. One of the frequently observed features at
range margins is fragmentation, caused internally by population dynamics or
externally by the limited availability of suitable habitat sites. We study both
causes, and describe the transition from a connected to a fragmented state
across space by means of a gradient metapopulation model. The main features of
our approach are the following. 1) Inhomogeneities can occur at two spatial
scales: there is a broad-scale gradient, which can be patterned by fine-scale
heterogeneities. The latter is implemented by dispersing a variable number of
small obstacles over the terrain, which can be penetrable or unpenetrable by
the spreading species. 2) We study the occupancy of this terrain in a
steady-state on two temporal scales: in snapshots and by long-term averages.
The simulations reveal some general scaling laws that are applicable in various
environments, independently of the mechanism of fragmentation. The edge of the
connected region (the hull) is a fractal with dimension 7/4. Its width and
length changes with the gradient according to universal scaling laws, that are
characteristic for percolation transitions. The results suggest that
percolation theory is a powerful tool for understanding the structure of range
margins in a broad variety of real-life scenarios, including those in which the
environmental gradient is combined with fine-scale heterogeneity. This provides
a new method for comparing the range margins of different species in various
geographic regions, and monitoring range shifts under climate change.
