Avemetatarsalia (meaning "bird metatarsals") is a clade of diapsid reptiles containing all archosaurs more closely related to birds than to crocodilians. The two most successful groups of avemetatarsalians were the dinosaurs and pterosaurs. Dinosaurs were the largest terrestrial animals for much of the Mesozoic Era, and one group of small feathered dinosaurs (Aves, i.e. birds) has survived up to the present day. Pterosaurs were the first flying vertebrates and persisted through the Mesozoic before dying out at the Cretaceous-Paleogene (K-Pg) extinction event. Both dinosaurs and pterosaurs appeared in the Triassic Period, shortly after avemetatarsalians as a whole. The name Avemetatarsalia was first established by British palaeontologist Michael Benton in 1999. An alternate name is Pan-Aves, or "all birds", in reference to its definition containing all animals, living or extinct, which are more closely related to birds than to crocodilians.
Although dinosaurs and pterosaurs were the only avemetatarsalians to survive past the end of the Triassic, other groups flourished during the Triassic. The most basal (earliest-branching) and plesiomorphic ("primitive") known avemetatarsalians were the aphanosaurs. Aphanosaurs were rare, four-legged carnivores which were only properly distinguished as a group in 2017. The split between dinosaurs and pterosaurs occurred just after aphanosaurs branched off the archosaur family tree. This split corresponds to the subgroup Ornithodira (Ancient Greek ὄρνις (órnis, "bird") + δειρή (deirḗ, "throat"), defined as the last common ancestor of dinosaurs and pterosaurs, and all of its descendants. Until the discovery of aphanosaurs, Ornithodira and Avemetatarsalia were considered roughly equivalent concepts.