Sperm competition between the ejaculates of multiple males for the fertilization of a given set of ova is taxonomically widespread. Males have evolved remarkable adaptations to increase their reproductive success under postcopulatory sexual selection, which in many species includes the ability to modify behaviour and ejaculate characteristics plastically to match the perceived level of sperm competition. Males of the model species Drosophila melanogaster increase mating duration and modify seminal fluid composition in response to short-term changes in sperm competition risk. If these responses increase a male's total investment in reproduction, he must either trade-off this cost against other life-history traits or suffer reduced survival. We tested whether mounting a plastic sperm competition response bears an instantaneous survival cost, and instead found that male D. melanogaster exposed to a high risk of sperm competition survive 12 per cent longer than those at low risk, equating to a 49 per cent reduction in the hourly hazard of death. This striking effect was found only among virgins: the high cost of mating in this species eliminates any such benefit among non-virgin males. Our results suggest that the improvement in survival found among virgins may be a product of males' tactical responses to sperm competition.