Reproduction at population lower edges is important for plant species persistence, especially in populations on contracting high-mountain islands. In this context, the ability of plants to reproduce in different microhabitats seems to be important to guarantee seed production in stressful environments, such as Mediterranean high mountains. We hypothesised that the warmer and drier conditions at the lower edge would be deleterious for the reproduction of Armeria caespitosa, an early-flowering plant. In addition, reproductive plasticity along this mountain gradient may also be microhabitat-dependent. We studied factors affecting the reproductive success of A. caespitosa, an endemic of the Spanish Sistema Central. We considered a complex set of predictors, including phenology, plant size and environmental factors at different scales using generalised estimating equations and generalised linear models. Microhabitat, together with the position in the altitudinal gradient and inter-annual variability affected the reproduction of A. caespitosa. In addition, individuals with longer flowering periods (duration of flowering) had significantly lower fruit set and a higher number of unviable seeds; delayed flowering peaks favoured the production of both viable and unviable fruits. Microhabitat variability over an altitudinal range is relevant for the reproduction of A. caespitosa, and is more important at the lower edge of the altitudinal range, where the species faces the most adverse conditions. In addition, the ability to reproduce in different microhabitats might increase the chances of the species to cope with environmental uncertainties under on-going climate warming. Finally, reproduction of this early-flowering plant is constrained by summer drought, which might shape its reproductive phenology.