The family Formicidae belongs to the order Hymenoptera, which also includes sawflies, bees, and wasps. Ants evolved from a lineage within the aculeate wasps, and a 2013 study suggests they are a sister group of the Apoidea.[15] In 1966, E. O. Wilson and his colleagues identified the fossil remains of an ant (Sphecomyrma) that lived in the Cretaceous period. The specimen, trapped in amber dating back to around 92 million years ago, has features found in some wasps, but not found in modern ants.[16] Sphecomyrma possibly was a ground forager, while Haidomyrmex and Haidomyrmodes, related genera in subfamily Sphecomyrminae, are reconstructed as active arboreal predators.[17] After the rise of flowering plants about 100 million years ago they diversified and assumed ecological dominance around 60 million years ago.[18][19][20][21] Some groups such as the Leptanillinae and Martialinae are suggested to have diversified from early primitive ants which were likely to have been predators underneath the surface of the soil.[2][22]
During the Cretaceous period, a few species of primitive ants ranged widely on the Laurasian supercontinent (the Northern Hemisphere). They were scarce in comparison to the populations of other insects, representing only about 1% of the entire insect population. Ants became dominant after adaptive radiation at the beginning of the Paleogene period. By the Oligocene and Miocene, ants had come to represent 20–40% of all insects found in major fossil deposits. Of the species that lived in the Eocene epoch, around one in 10 genera survive to the present. Genera surviving today comprise 56% of the genera in Baltic amber fossils (early Oligocene), and 92% of the genera in Dominican amber fossils (apparently early Miocene).[18][23]
Termites, although sometimes called 'white ants', are not ants. They belong to the order Isoptera. Termites are more closely related to cockroaches and mantids. Termites are eusocial, but differ greatly in the genetics of reproduction. The similarity of their social structure to that of ants is attributed to convergent evolution.[24] Velvet ants look like large ants, but are wingless female wasps.[