OpenStax Biology 2e
The first amniotes evolved from tetrapod ancestors approximately 340 million years ago during the Carboniferous period. The early amniotes quickly diverged into two main lines: synapsids and sauropsids. Synapsids included the therapsids, a clade from which mammals evolved. Sauropsids were further divided into anapsids and diapsids. Diapsids gave rise to the reptiles, including the dinosaurs and birds. The key differences between the synapsids, anapsids, and diapsids are the structures of the skull and the number of temporal fenestrae (“windows”) behind each eye. Temporal fenestrae are post-orbital openings in the skull that allow muscles to expand and lengthen. Anapsids have no temporal fenestrae, synapsids have one (fused ancestrally from two fenestrae), and diapsids have two (although many diapsids such as birds have highly modified diapsid skulls). Anapsids include extinct organisms and traditionally included turtles. However, more recent molecular and fossil evidence clearly shows that turtles arose within the diapsid line and secondarily lost the temporal fenestrae; thus they appear to be anapsids because modern turtles do not have fenestrae in the temporal bones of the skull. The canonical diapsids include dinosaurs, birds, and all other extinct and living reptiles.
The diapsids in turn diverged into two groups, the Archosauromorpha (“ancient lizard form”) and the Lepidosauromorpha (“scaly lizard form”) during the Mesozoic period. The lepidosaurs include modern lizards, snakes, and tuataras. The archosaurs include modern crocodiles and alligators, and the extinct ichthyosaurs (“fish lizards” superficially resembling dolphins), pterosaurs (“winged lizard”), dinosaurs (“terrible lizard”), and birds. (We should note that clade Dinosauria includes birds, which evolved from a branch of maniraptoran theropod dinosaurs in the Mesozoic.)
The evolutionarily derived characteristics of amniotes include the amniotic egg and its four extraembryonic membranes, a thicker and more waterproof skin, and rib ventilation of the lungs (ventilation is performed by drawing air into and out of the lungs by muscles such as the costal rib muscles and the diaphragm).
In the past, the most common division of amniotes has been into the classes Mammalia, Reptilia, and Aves. However, both birds and mammals are descended from different amniote branches: the synapsids giving rise to the therapsids and mammals, and the diapsids giving rise to the lepidosaurs and archosaurs. We will consider both the birds and the mammals as groups distinct from reptiles for the purpose of this discussion with the understanding that this does not accurately reflect phylogenetic history and relationships.
Clark, M., Douglas, M., Choi, J. Biology 2e. Houston, Texas: OpenStax. Access for free at: https://openstax.org/details/books/biology-2e