Understanding the genetic basis of phenotypic variation in natural populations remains one of the central problems in modern biology. We investigated the genetic basis of a classic phenotypic dimorphism in Caenorhabditis elegans. Males from many natural isolates deposit a copulatory plug after mating, whereas males from other natural isolates-including the standard wild-type strain (N2 Bristol) that is used in most research laboratories-do not deposit plugs. The copulatory plug is a gelatinous mass that covers the hermaphrodite vulva, and it appears to serve a mate-guarding function in this species. We show that variation in plugging ability results from the insertion of a retrotransposon into an exon of a novel mucin-like gene,
plg-1, whose product is a major structural component of the copulatory plug. The gene is expressed in a subset of secretory cells of the male somatic gonad, and its loss has no evident effects beyond the loss of male mate-guarding. Although C. elegans descends from an obligate-outcrossing, male-female ancestor, it occurs primarily as self-fertilizing hermaphrodites. The reduced selection on male-male competition associated with the origin of hermaphroditism may have permitted the global spread of a loss-of-function mutation with restricted pleiotropy.