The extent to which an organism is selected to invest in defences against pathogens and parasites depends on the advantages that ensue should infection occur, but also on the costs of maintaining defences in the absence of infection. The presence of heritable variation in resistance suggests that costs exist, but we know very little about the nature or magnitude of these costs in natural populations of animals. A powerful technique for identifying trade-offs between fitness components is the study of correlated responses to artificial selection. We have selected Drosophila melanogaster for improved resistance against an endoparasitoid, Asobara tabida. Endoparasitoids are insects whose larvae develop internally within the body of other insects, eventually killing them, although their hosts can sometimes survive attack by mounting a cellular immune response. We found that reduced larval competitive ability in unparasitized D. melanogaster is a correlated response to artificial selection for improved resistance against A. tabida. The strength of selection for competitive ability and parasitoid resistance is likely to vary temporally and spatially, which may explain the observed heritable variation in resistance.