Supergenes are groups of tightly linked loci whose variation is inherited as a single Mendelian locus and are a common genetic architecture for complex traits under balancing selection 1 . Supergene alleles are long-range haplotypes with numerous mutations underlying distinct adaptive strategies, often maintained in linkage disequilibrium through the suppression of recombination by chromosomal rearrangements [2][3][4][5] . However, the mechanism governing the formation of supergenes is not well understood, and poses the paradox of establishing divergent functional haplotypes in face of recombination 1,6 . Here, we show that the formation of the supergene alleles encoding mimicry polymorphism in the butterfly Heliconius numata is associated with the introgression of a divergent, inverted chromosomal segment. Haplotype divergence and linkage disequilibrium indicate that supergene alleles, each allowing precise wing-pattern resemblance to distinct butterfly models, originate from over a million years of independent chromosomal evolution in separate lineages. These "superalleles" have evolved from a chromosomal inversion captured by introgression and maintained in balanced polymorphism, triggering supergene inheritance. This mode of evolution is likely to be a common feature of complex structural polymorphisms associated with the coexistence of distinct adaptive syndromes, and shows that the reticulation of genealogies may have a powerful influence on the evolution of genetic architectures in nature.How new beneficial traits which require more than one novel mutation emerge in natural populations is a long-standing question in biology [7][8][9] . Supergenes control alternative adaptive strategies that require the association of multiple co-adapted characters, and have evolved repeatedly in many taxa under balancing selection. Examples include floral heteromorphy determining alternative pollination strategies 10