Females in almost all animal groups copulate with multiple males. This behaviour allows different males to compete for fertilization and gives females the opportunity to mediate this competition. In many animals and most insects, the second male to copulate with a female typically sires most of her offspring. In Drosophila melanogaster, this second-male sperm precedence has long been studied but, as in most species, its mechanism has remained unknown. Here we show, using labelled sperm in doubly mated females, that males can both physically displace and incapacitate stored sperm from earlier-mating males. Displacement occurs only if the second male transfers sperm to the female, and in only one of her three sperm-storage organs. Incapacitation can be caused by either fertile or spermless second males, but requires extended intervals between matings. Sperm from different males are not 'stratified' in the storage organs but mix freely. Many animal species may have multiple mechanisms of sperm competition like those observed here, and revealing these mechanisms is necessary to understand the genetic and evolutionary basis of second-male sperm precedence in animals.