Reptiles originated approximately 300 million years ago during the Carboniferous period. One of the oldest-known amniotes is Casineria, which had both amphibian and reptilian characteristics. One of the earliest undisputed reptiles was Hylonomus. Soon after the first amniotes appeared, they diverged into three groups (synapsids, anapsids, and diapsids) during the Permian period. The Permian period also saw a second major divergence of diapsid reptiles into archosaurs (predecessors of crocodilians and dinosaurs) and lepidosaurs (predecessors of snakes and lizards). These groups remained inconspicuous until the Triassic period when the archosaurs became the dominant terrestrial group due to the extinction of large-bodied anapsids and synapsids during the Permian-Triassic extinction. About 250 million years ago, archosaurs radiated into the dinosaurs and the pterosaurs.
Although they are sometimes mistakenly called dinosaurs, the pterosaurs were distinct from true dinosaurs . Pterosaurs had a number of adaptations that allowed for flight, including hollow bones (birds also exhibit hollow bones, a case of convergent evolution). Their wings were formed by membranes of skin that attached to the long, fourth finger of each arm and extended along the body to the legs.
The dinosaurs were a diverse group of terrestrial reptiles with more than 1,000 species identified to date. Paleontologists continue to discover new species of dinosaurs. Some dinosaurs were quadrupeds; others were bipeds . Some were carnivorous, whereas others were herbivorous. Dinosaurs laid eggs; a number of nests containing fossilized eggs have been found. It is not known whether dinosaurs were endotherms or ectotherms. However, given that modern birds are endothermic, the dinosaurs that served as ancestors to birds were probably endothermic as well. Some fossil evidence exists for dinosaurian parental care. Comparative biology supports this hypothesis since the archosaur birds and crocodilians display parental care.
Dinosaurs dominated the Mesozoic Era, which was known as the "Age of Reptiles." The dominance of dinosaurs lasted until the end of the Cretaceous period, the end of the Mesozoic Era. The Cretaceous-Tertiary extinction resulted in the loss of most of the large-bodied animals of the Mesozoic Era. Birds are the only living descendants of one of the major clades of dinosaurs.