Edible dormice (Glis glis) reproduce in years with beech mast seeding, but entire populations may skip reproduction in years when tree seeds, a major food resource of this small hibernator, are absent. We tested the hypothesis that the year-to-year variability in reproductive effort caused by this breeding strategy should lead to detectable differences in yearly survival rates. Therefore, we analyzed capture-recapture data from animals occupying nest boxes, collected over nine years at two study sites in Germany. Among fully grown adults (aged two years or older), survival probabilities were significantly lower (0.32 +/- 0.04) after reproductive years (n = 5) compared to years (n = 4) with absent or below-average reproduction (0.58 +/- 0.07) on both study sites. This trade-off between reproduction and subsequent survival was observed in both females and males and appears to be a relatively rare case in which costs of reproduction in terms of longevity are detectable at the population level. Effects of reproduction on survival were less pronounced when yearlings (with a generally lower reproductive effort) were included and were more distinct in a suboptimal habitat. Of those females breeding in nest boxes, 96.5% had only one or two litters within the study period. Considering these and previously published results, including a report of extremely high mean longevities (9-12 years) of dormice in a habitat with infrequent mast seeding, we conclude that edible dormice flexibly adjust life history tactics to local mast patterns. Long stretches of mast failures can in fact lead to relative semelparity, i.e., a strategy in which dormice "sit tight" for several years until environmental conditions are favorable for reproduction.