Metapopulation theory has generally focused only on the stochastic turn-over rate among populations and assumed that the number and location of suitable habitat patches will remain constant through time. This study combines in a PVA both the deterministic landscape dynamics and the stochastic colonisations and extinctions of populations for the butterfly Lopinga achine in Sweden. With data on occupancy pattern and the rate of habitat change, we built a simulation model and examined five different scenarios with different assumptions of landscape changes for L. achine. If no landscape changes would be expected, around 80 populations are predicted to persist during the next 100 yr. Adding the knowledge that many of the sites are unmanaged and that the host plant will slowly deteriorate as canopies close over, and adding environmental variation and synchrony, showed that the number of populations will decrease to around of 4.3 and 2.8 respectively, with an extinction risk of 34% – quite different from the first scenario based only on the metapopulation model. This study has shown the importance of incorporating both deterministic and stochastic events when making a reliable population viability analysis. Even though one can not expect that the long-term predictions of either occupied patches or extinction risks will be accurate quantitatively, the qualitative implications are correct. The extinction risk will be high if grazing is not applied to more patches than is the case today. The simulations indicate that an absolute minimum of 10–30 top-ranked patches needs to be managed for the persistence of the metapopulation of L. achine in the long term. The same problem of abandoned and overgrowing habitats affects many other threatened species in the European landscape and a similar approach could also be applied to them.