Environmental variability may cause changes in flowering phenology affecting plant reproductive success. Plasticity in phenological processes may guarantee species survival under new environmental conditions, such as those caused by global warming. Here we examined the flowering patterns of Thymelaea velutina (Thymelaeaceae), a dioecious shrub endemic to the Balearic Islands. We compared the two contrasting habitats where the species occurs: coastal dunes at sea level and mountain areas (c. 1200 m a.s.l.). We determined the relationship between three components of flowering phenology: initial date, flower duration, and synchrony, and assessed their association with traits describing plant size and fecundity. The increase in altitude results into a delayed flowering initiation and a shorter flowering period. In both habitats, male plants flowered earlier and for longer periods than females. At the mountain site, fruit set was associated to flower initiation, so that plants flowering earlier produced greater proportions of fruits. By contrast, fruit set at the dune site did not depend upon either flower initiation or flowering period; here, larger plants had longer flowering periods, though not necessarily produced more flowers and did not set more fruits than smaller plants. We attribute the differences in flowering patterns at different altitudes to phenotypic plasticity of the species; it is adapted to mountain conditions delaying the flowering period (probably adjusting it to the insect abundance at this altitude). Moreover, shortening of the flowering period may be also advantageous to reduce the stressful effects of higher temperature, radiation and drought that occur later in the summer.