What’s the News: A single species of butterfly in the Amazon is able to copy the wing patterns of several neighboring species to avoid being eaten by hungry birds—a wide-ranging talent that has long perplexed evolutionary biologists. Now, an international team of scientists studying the mimicking butterfly Heliconius numata has finally solved this puzzle that plagued even Charles Darwin.

Writing in the journal Nature, researchers found that a specific supergene—a cluster of genes that is passed on to offspring as one big chunk—controls the different elements of wing patterns, allowing related butterflies to display distinct markings despite having the same DNA. “These butterflies are the ‘transformers’ of the insect world,” lead researcher Mathieu Joron said in a prepared statement. “But instead of being able to turn from a car into a robot with the flick of switch, a single genetic switch allows these insects to morph into several different mimetic forms.”

What’s the Context:

Melinaea is a genus of butterflies that has several species—each with their own wing pattern—that are poisonous to birds. Heliconius numata, another species of toxic butterfly in the Amazon rainforest, mimics the coloration of Melinaea to scare birds away from eating them.

When two harmful species mimic each other’s warning signals, it is called Müllerian mimicry. The animals essentially collaborate to teach predators to stay away from species with certain characteristics, like distinctive wing patterns. This differs from Batesian mimicry, where an innocuous species will mimic a dangerous one.

What’s particularly interesting about H. numata is that a single, interbreeding population mimics not one, but seven Melinaea wing patterns. As Nicholas Wade of the New York Times describes it: “since genes get shuffled in each generation, the different wing patterns should quickly merge together when parents with different wing patterns mate.” But this doesn’t happen.

How the Heck:

To determine how these successful color combinations in H. numata arise, and how non-mimetic patterns don’t, the researchers sequenced the chromosomal region responsible for wing patterns in the butterfly species. They found that a single region on a single chromosome—containing 18 genes locked together in a supergene—controls the butterfly’s wing-pattern variation.

The team identified three versions of the supergene in H. numata, each with its component genes in a different order, creating distinctive wing patterns. The supergene versions are inherited by offspring as a single unit, allowing mimetic wing patterns to be passed on in full from one generation to the next. If parent butterflies have differing wing patterns, offspring will display the wing pattern of the dominant supergene.

The Future Holds:

The researchers can’t yet account for all of H. numata’s wing patterns. Further research may discover other supergene versions, Joron told the New York Times.