The phenomenon of sex-limited mimicry is phylogenetically widespread in the swallowtail butterfly genus Papilio — now, a single gene, doublesex, is shown to control supergene mimicry, a finding that is in contrast to the long-held view that supergenes are likely to be controlled by a tightly linked cluster of loci.