Background Concerns about loss of greenspace with urbanisation motivate much research on nature and health; however, contingency of greenspace-health associations on the character of community change remains understudied. Methods With aggregate data from governmental sources for 1432 Swedish parishes, we used negative binomial regression to estimate incidence rate ratios (IRRs) for all-cause and cardiovascular disease (CVD) mortality during 2000-2008 in relation to percentage area (in 2000) of urban residential greenspace, urban parks and rural greenspace, looking across parishes with decrease, stability or increase in population density. We also assessed interactions between land use and population change. Results Parishes with ≥1 decile increase in population density had lower incidence of all-cause (IRR=0.91, 95% CI 0.87 to 0.95) and CVD mortality (IRR=0.89, 95% CI 0.84 to 0.94) compared with parishes with stable populations. In stable parishes, all-cause mortality was lower with higher percentages of urban green (IRR=0.998, 95% CI 0.996 to 1.000) and rural green land uses (IRR=0.997, 95% CI 0.996 to 0.999). These results were inverted in densifying parishes; higher all-cause mortality attended higher initial percentages of urban (IRR=1.081, 95% CI 1.037 to 1.127) and rural greenspace (IRR=1.042, 95% CI 1.007 to 1.079) as measured in 2000. Similar associations held for CVD mortality. Conclusions More greenspace was associated with lower all-cause and CVD mortality in communities with relatively stable populations. In densifying communities, population growth per se may reduce mortality, but it may also entail harm through reductions in amount per capita and/or quality of greenspace.