Sex allocation has been studied mainly in small herbaceous plants but much less in monoecious wind-pollinated trees. The aim of this study was to explore changes in gender segregation and sex allocation by Pinus halepensis, a Mediterranean lowland pine tree, within tree crowns and between trees differing in their size or crown shape. The production of new male and female cones and sex allocation of biomass, nitrogen and phosphorus were studied. The relationship between branch location, its reproductive status and proxies of branch vigour was also studied. Small trees produced only female cones, but, as trees grew, they produced both male and female cones. Female cones were produced mainly in the upper part of the crown, and male cones in its middle and lower parts. Lateral branch density was correlated with the number of male but not female cones; lateral branches were more dense in large than in small trees and even denser in hemispherical trees. Apical branches grew faster, were thicker and their phosphorus concentration was higher than in lateral shoots. Nitrogen concentration was higher in cone-bearing apical branches than in apical vegetative branches and in lateral branches with or without cones. Allocation to male relative to female function increased with tree size as predicted by sex allocation theory. The adaptive values of sex allocation and gender segregation patterns in P. halepensis, in relation to its unique life history, are demonstrated and discussed. Small trees produce only female cones that have a higher probability of being pollinated than the probability of male cones pollinating; the female-first strategy enhances population spread. Hemispherical old trees are loaded with serotinous cones that supply enough seeds for post-fire germination; thus, allocation to males is more beneficial than to females.