Abstract We study a dynamic model of ecosystems where an immigration flux assembles the species community and maintains its biodiversity. This framework is particularly relevant for insular ecosystems. Population dynamics is represented either as an individual-based model or as a set of deterministic equations for population abundances. Local extinctions and immigrations balance at a statistically stationary state where biodiversity fluctuates around a constant mean value. We find a number of scaling laws characterizing this stationary state. In particular, the number of species increases as a power law of the immigration rate. With additional assumptions on the immigration flux, we obtain species–area relationships in agreement with observations for archipelagos. We also find power-law distributions for species abundances and lifetimes.