structural:summarization, information:classification
The evolution of mammals has passed through many stages since the first appearance of their synapsid ancestors in the Pennsylvanian sub-period of the late Carboniferous period. By the mid-Triassic, there were many synapsid species that looked like mammals. The lineage leading to today's mammals split up in the Jurassic; synapsids from this period include Dryolestes, more closely related to extant placentals and marsupials than to monotremes, as well as Ambondro, more closely related to monotremes. Later on, the eutherian and metatherian lineages separated; the metatherians are the animals more closely related to the marsupials, while the eutherians are those more closely related to the placentals. Since Juramaia, the earliest known eutherian, lived 160 million years ago in the Jurassic, this divergence must have occurred in the same period. After the Cretaceous–Paleogene extinction event wiped out the non-avian dinosaurs and several mammalian groups, placental and marsupial mammals diversified into many new forms and ecological niches throughout the Paleogene and Neogene, by the end of which all modern orders had appeared. The synapsid lineage became distinct from the sauropsid lineage in the late Carboniferous period, between 320 and 315 million years ago. The only living synapsids are mammals, while the sauropsids gave rise to the dinosaurs, and today's reptiles and birds along with all the extinct amniotes more closely related to them than to mammals. Primitive synapsids were traditionally called mammal-like reptiles or pelycosaurs, but both are now seen as outdated and disfavored paraphyletic terms, since they were not reptiles, nor part of reptile lineage. The modern term for these is stem mammals, and sometimes protomammals or paramammals. Throughout the Permian period, the synapsids included the dominant carnivores and several important herbivores. In the subsequent Triassic period, however, a previously obscure group of sauropsids, the archosaurs, became the dominant vertebrates. The mammaliaforms appeared during this period; their superior sense of smell, backed up by a large brain, facilitated entry into nocturnal niches with less exposure to archosaur predation. The nocturnal lifestyle may have contributed greatly to the development of mammalian traits such as endothermy and hair. Later in the Mesozoic, after theropod dinosaurs replaced rauisuchians as the dominant carnivores, mammals spread into other ecological niches. For example, some became aquatic, some were gliders, and some even fed on juvenile dinosaurs. Most of the evidence consists of fossils. For many years, fossils of Mesozoic mammals and their immediate ancestors were very rare and fragmentary; but, since the mid-1990s, there have been many important new finds, especially in China. The relatively new techniques of molecular phylogenetics have also shed light on some aspects of mammalian evolution by estimating the timing of important divergence points for modern species. When used carefully, these techniques often, but not always, agree with the fossil record. Although mammary glands are a signature feature of modern mammals, little is known about the evolution of lactation as these soft tissues are not often preserved in the fossil record. Most research concerning the evolution of mammals centers on the shapes of the teeth, the hardest parts of the tetrapod body. Other important research characteristics include the evolution of the middle ear bones, erect limb posture, a bony secondary palate, fur, hair, and warm-bloodedness.