Spatially structured populations in patchy habitats show much variation in migration rate, from patchy populations in which individuals move repeatedly among habitat patches to classic metapopulations with infrequent migration among discrete populations. To establish a common framework for population dynamics in patchy habitats, we describe an individual-based model (IBM) involving a diffusion approximation of correlated random walk of individual movements. As an example, we apply the model to the Glanville fritillary butterfly (Melitaea cinxia) inhabiting a highly fragmented landscape. We derive stochastic patch occupancy model (SPOM) approximations for the IBMs assuming pure demographic stochasticity, uncorrelated environmental stochasticity, or completely correlated environmental stochasticity in local dynamics. Using realistic parameter values for the Glanville fritillary, we show that the SPOMs mimic the behavior of the IBMs well. The SPOMs derived from IBMs have parameters that relate directly to the life history and behavior of individuals, which is an advantage for model interpretation and parameter estimation. The modeling approach that we describe here provides a unified framework for patchy populations with much movements among habitat patches and classic metapopulations with infrequent movements.Keywords: patchy population, metapopulation, individual-based model, stochastic patch occupancy model, Glanville fritillary butterfly, SPOMSIM.* E-mail: otso.ovaskainen@helsinki.fi. † E-mail: ilkka.hanski@helsinki.fi. Populations and metapopulations inhabiting fragmented landscapes show much variation in migration rate among habitat patches. In one extreme, termed the patchy population model (Harrison 1991), individuals move frequently among habitat patches and may reproduce in several patches during their lifetime. In the other extreme, most individuals remain all their life in the natal population, and movements among populations are infrequent, though migration rate is high enough to allow eventual recolonization of habitat patches where a local population has gone extinct (the classic metapopulation model; Levins 1969). Clearly, it would be helpful to have a theoretical framework that allows the full range of migration rate to be modeled. One such modeling framework is called structured metapopulation models, which are structured by the distribution of local population sizes (Hastings and Wolin 1989;Gyllenberg and Hanski 1992;Lande et al. 1998Lande et al. , 1999Casagrandi and Gatto 1999;Saether et al. 1999) or by a simple classification of population sizes (Hanski 1985;Hastings 1991;Hanski and Zhang 1993). Local dynamics and migration are modeled mechanistically, and there are no restrictions on the rate of migration; the consequences of emigration and immigration on local dynamics are fully accounted for. However, these models make the simplifying island model assumptions of global migration among infinitely many identical habitat patches (the assumption of identical patches was relaxed by Gyll...