The response to selection on age at reproduction was measured to test for a genetic trade-off between early fecundity and longevity in the melon fly Bactrocera cucurbitae (Coquillett). Three replicate lines were selected for propagation by breeding from young (Y-lines) and old (O-lines) adults, respectively. Selection was continued for 24 and 9 generations for Y-and O-lines, respectively. Females from O-lines lived longer than Y-line females as an indirect response to selection, indicating that longevity is a trait under genetic control. Females from Y-lines had higher fecundity early in the lifespan, a shorter preoviposition period, and a shorter prepeak fecundity period than females from O-lines. However, total fecundity did not differ between lines from the two selection regimes. These results suggest the existence of a genetic trade-off between early fecundity and longevity in the population examined, which may be controlled by pleiotropy. The larval period of the O-lines was longer than that of the Y-lines, whereas there were no significant effects of selection regime on egg hatchability or preadult survival rate. The trade-off relationship between early fecundity and longevity is discussed in relation to mass production of the melon fly for the sterile insect technique programme.