In mating systems with strictly limited male mating opportunities, a male's reproductive success depends strongly on the quality of his mate. Female quality is often linked to body size and mass. Hence, males with limited mating opportunities should choose large and heavy females to maximize their reproductive success. However, high-quality females are likely to attract more than one male, which consequently results in male–male competition. This scenario can be found in the spider species Argiope lobata. Males can copulate twice at most and eventually die after mating, but can monopolize females through the application of mating plugs. These plugs are costly because males block the female's genital openings with parts of their sperm-transferring organs (pedipalps), rendering them dysfunctional. Plugging moreover increases the risk of sexual cannibalism. We tested whether male A. lobata adjust their mating investment to the expected gains, which are a function of female fecundity and the risk of sperm competition. We presented males with virgin females of different fecundity, in either the presence or absence of a rival. Indeed, we found that males were selective and preferred larger females under competitive conditions. When a rival was present and the female was small, males frequently performed ultrashort copulations of less than 3 s without sperm transfer. Ultrashort copulations may imply that males were not willing to invest in paternity under these conditions. In contrast, when two rivals competed for heavy and thus fecund females, males were significantly more likely to monopolize paternity by depositing a plug. In conclusion, our results suggest that males try to adapt their copulatory behaviour to female quality and the degree of sperm competition even in ‘dangerous’ mating systems.