It has long been recognized that male mating competition is responsible for the evolution of weaponry for mate acquisition. However, when females mate with more than one male, competition between males can continue after mating in the form of sperm competition. Theory predicts that males should increase their investment in sperm production as sperm competition is increased, but it assumes that males face a trade-off between sperm production and other life-history traits such as mate acquisition. Here, we use a genus of horned beetle, Onthophagus, to examine the trade-off between investment in testes required for fertilizations and investment in weapons used to obtain matings. In a within-species study, we prevented males from developing horns and found that these males grew larger and invested relatively more in testes growth than did males allowed to grow horns. Among species, there was no general relationship between the relative sizes of horns and testes. However, the allometric slope of horn size on body size was negatively associated with the allometric slope of testes size on body size. We suggest that this reflects meaningful evolutionary changes in the developmental mechanisms regulating trait growth, specifically in the degree of nutrition-dependent phenotypic plasticity versus canalization of traits. Finally, we show how this resource allocation trade-off has influenced the evolutionary diversification of weapons, revealing a rich interplay between developmental trade-offs and both preand postmating mechanisms of sexual competition.secondary sexual traits ͉ sperm competition ͉ testes size ͉ beetle horns