We describe a Bayesian random effects model of mark-recapture data that accounts for age-dependence in survival and individual heterogeneity in capture probabilities and survival. The model is applied to data on the Glanville fritillary butterfly (Melitaea cinxia) collected from a population enclosed in a large cage in the field. The cage population consisted of a mixture of butterflies originating from newly established and old populations in a large metapopulation in the Aland Islands in Finland. The explanatory variables in the model included the effects of temperature, sex, and population type (new vs. old) on capture probabilities, and the effects of age, sex, population type, and day vs. night on survival. We found that mortality rate increased with age, that mortality rate was much higher during the day than during the night, and that the life span of females originating from newly established populations was shorter than the life span of females from old populations. Capture probability decreased with increasing temperature and decreased with increasing mobility of individuals.