Sexual cannibalism, in particular before insemination, is a long-standing evolutionary paradox because it persists despite extreme costs for the victim, usually the male. Several adaptive and nonadaptive hypotheses have been proposed to explain this phenomenon, but empirical studies are still scarce and results are inconclusive. We studied the spider Araneus diadematus in which females may attack and kill potential mates at any time during courtship or mating, making the species ideal for examining the causes of pre- and postinsemination sexual cannibalism. We manipulated food availability for females and conducted mating trials in the laboratory to test predictions derived from two hypotheses: the adaptive female foraging (AFF) hypothesis, which views sexual cannibalism as an optimal female behaviour in the face of a trade-off between mating and cannibalizing a courting male; and the mate size dimorphism (MSD) hypothesis, which postulates a physical advantage of larger females in subduing males. We found partial support for the AFF hypothesis, but MSD explained sexual cannibalism irrespective of the timing of cannibalism. Our results suggest that a complex interplay of female state, mate choice and physical dominance is responsible for the maintenance of sexual cannibalism against male interests.