Most species produce equal numbers of sons and daughters, and sex differences in survival after parental care do not usually affect this pattern. Temporary overproduction of the scarcer sex can be adaptive when generations overlap, the sexes differ in life-history expectations, and parents can anticipate future mating opportunities. However, an alternative strategy of maximizing the competitiveness of the more abundant sex in these circumstances remains unexplored. We develop theory showing how mothers can maximize reproductive value when future mate competition will be high by producing more sons in the advantageous early hatching positions within their broods. Our model for optimal birth order was supported by long-term data of offspring sex in a parrot facing catastrophic female mortality caused by introduced predators. Swift parrots (Lathamus discolor) suffer high female mortality due to introduced sugar gliders (Petaurus breviceps) creating fluctuating male-biased adult sex ratios. Offspring hatched early within broods fledged in better condition, and in support of our model were more likely to be male in years with higher adult female mortality. We found a highly significant rank-order correlation between observed and predicted birth sex ratios. Our study shows the potential for mothers to maximize reproductive value via strategic biases in offspring sex depending on the advantages conferred by birth order and the predictability of future mate competition. Our long-term data support the predictions and appear to suggest that sex allocation strategies may evolve surprisingly quickly when anthropogenic pressures on populations are severe.