The relationship between dinosaurs and other reptiles is well established1,2,3,4, but the sequence of acquisition of dinosaurian features has been obscured by the scarcity of fossils with transitional morphologies. The closest extinct relatives of dinosaurs either have highly derived morphologies5,6,7or are known from poorly preserved8,9or incomplete material10,11. Here we describe one of the stratigraphically lowest and phylogenetically earliest members of the avian stem lineage (Avemetatarsalia),Teleocrater rhadinusgen. et sp. nov., from the Middle Triassic epoch. The anatomy ofT. rhadinusprovides key information that unites several enigmatic taxa from across Pangaea into a previously unrecognized clade, Aphanosauria. This clade is the sister taxon of Ornithodira (pterosaurs and birds) and shortens the ghost lineage inferred at the base of Avemetatarsalia. We demonstrate that several anatomical features long thought to characterize Dinosauria and dinosauriforms evolved much earlier, soon after the bird-crocodylian split, and that the earliest avemetatarsalians retained the crocodylian-like ankle morphology and hindlimb proportions of stem archosaurs and early pseudosuchians. Early avemetatarsalians were substantially more species-rich, widely geographically distributed and morphologically diverse than previously recognized. Moreover, several early dinosauromorphs that were previously used as models to understand dinosaur origins may represent specialized forms rather than the ancestral avemetatarsalian morphology.