Scientists have traced nearly 3,000 genes to find the earliest common ancestor of butterflies and moths, creating an extensive evolutionary history of these colorful insects.

The "Tree of Lepidoptera" reveals some surprising findings about butterflies and their close relative the moth. It turns out butterflies are more closely related to small moths than to large ones, which completely changes scientists' previous understanding of how butterflies evolved. The study also found that some insects once classified as moths are actually butterflies, increasing the number of butterfly species in existence.

"This project advances biodiversity research by providing an evolutionary foundation for a very diverse group of insects, with nearly 160,000 described species," lead author Akito Kawahara of the University of Florida said in a statement. "With a tree, we can now understand how the majority of butterfly and moth species evolved."

Using advanced DNA sequencing methods, researchers identified 2,696 genes by breaking DNA down and piecing it back together. They developed an initial sample of 46 species that represent many of the most bio diverse groups of moths and butterflies. They also combined 33 new transcriptomes, a set of RNA molecules, with 13 genomes.

Scientists have long struggled with placing butterflies in evolutionary history - for instance, butterfly and moth larval stages have given them some problems. But Kawahara and his team hope that their results will help pinpoint exactly where these species belong.

"The few Lepidoptera fossils we have are from about 15 million years ago," co-author Jesse Breinholt added. "The next step is to create a dated evolutionary history for the group, from the earliest ancestors to present day."

In addition, future research using this evolutionary tree will determine whether butterfly daytime activity, a common trait, evolved much earlier than scientists previously believed - possibly as a means of escaping bats and other nocturnal predators, Kawahara said.

As co-author Daniel Rubinoff notes, "this is clearly the future of deep-level evolutionary research."

The findings are described in the journal Proceedings of the Royal Society B: Biological Sciences.