Background and Aims The study of local adaptation in plant reproductive traits has received substantial attention in short-lived species, but studies conducted on forest trees are scarce. This lack of research on long-lived species represents an important gap in our knowledge, because inferences about selection on the reproduction and life history of short-lived species cannot necessarily be extrapolated to trees. This study considers whether the size for first reproduction is locally adapted across a broad geographical range of the Mediterranean conifer species Pinus pinaster. In particular, the study investigates whether this monoecious species varies genetically among populations in terms of whether individuals start to reproduce through their male function, their female function or both sexual functions simultaneously. Whether differences among populations could be attributed to local adaptation across a climatic gradient is then considered. Methods Male and female reproduction and growth were measured during early stages of sexual maturity of a P. pinaster common garden comprising 23 populations sampled across the species range. Generalized linear mixed models were used to assess genetic variability of early reproductive life-history traits. Environmental correlations with reproductive life-history traits were tested after controlling for neutral genetic structure provided by 12 nuclear simple sequence repeat markers. Key Results Trees tended to reproduce first through their male function, at a size (height) that varied little among source populations. The transition to female reproduction was slower, showed higher levels of variability and was negatively correlated with vegetative growth traits. Several female reproductive traits were correlated with a gradient of growth conditions, even after accounting for neutral genetic structure, with populations from more unfavourable sites tending to commence female reproduction at a lower individual size. Conclusions The study represents the first report of genetic variability among populations for differences in the threshold size for first reproduction between male and female sexual functions in a tree species. The relatively uniform size at which individuals begin reproducing through their male function probably represents the fact that pollen dispersal is also relatively invariant among sites. However, the genetic variability in the timing of female reproduction probably reflects environment-dependent costs of cone production. The results also suggest that early sex allocation in this species might evolve under constraints that do not apply to other conifer