section_path: Evolutionary history/Origins and early evolution
section_name: Origins and early evolution
paragraph_text: Origins and early evolution
  
  Dinosaurs diverged from their archosaur ancestors during the Middle to Late Triassic epochs, roughly 20 million years after the devastating Permian–Triassic extinction event wiped out an estimated 96% of all marine species and 70% of terrestrial vertebrate species approximately 252 million years ago. The oldest dinosaur fossils known from substantial remains date to the Carnian epoch of the Triassic period and have been found primarily in the Ischigualasto and Santa Maria Formations of Argentina and Brazil, and the Pebbly Arkose Formation of Zimbabwe.
  
  The Ischigualasto Formation (radiometrically dated at 231-230 million years old) has produced the early saurischian Eoraptor, originally considered a member of the Herrerasauridae but now considered to be an early sauropodomorph, along with the herrerasaurids Herrerasaurus and Sanjuansaurus, and the sauropodomorphs Chromogisaurus, Eodromaeus, and Panphagia. Eoraptor ' s likely resemblance to the common ancestor of all dinosaurs suggests that the first dinosaurs would have been small, bipedal predators. The Santa Maria Formation (radiometrically dated to be older, at 233.23 million years old) has produced the herrerasaurids Gnathovorax and Staurikosaurus, along with the sauropodomorphs Bagualosaurus, Buriolestes, Guaibasaurus, Macrocollum, Nhandumirim, Pampadromaeus, Saturnalia, and Unaysaurus. The Pebbly Arkose Formation, which is of uncertain age but was likely comparable to the other two, has produced the sauropodomorph Mbiresaurus, along with an unnamed herrerasaurid.
  
  Less well-preserved remains of the sauropodomorphs Jaklapallisaurus and Nambalia, along with the early saurischian Alwalkeria, are known from the Upper Maleri and Lower Maleri Formations of India. The Carnian-aged Chañares Formation of Argentina preserves primitive, dinosaur-like ornithodirans such as Lagosuchus and Lagerpeton in Argentina, making it another important site for understanding dinosaur evolution. These ornithodirans support the model of early dinosaurs as small, bipedal predators. Dinosaurs may have appeared as early as the Anisian epoch of the Triassic, approximately 243 million years ago, which is the age of Nyasasaurus from the Manda Formation of Tanzania. However, its known fossils are too fragmentary to identify it as a dinosaur or only a close relative. The referral of the Manda Formation to the Anisian is also uncertain. Regardless, dinosaurs existed alongside non-dinosaurian ornithodirans for a period of time, with estimates ranging from 5–10 million years to 21 million years.
  
  When dinosaurs appeared, they were not the dominant terrestrial animals. The terrestrial habitats were occupied by various types of archosauromorphs and therapsids, like cynodonts and rhynchosaurs. Their main competitors were the pseudosuchians, such as aetosaurs, ornithosuchids and rauisuchians, which were more successful than the dinosaurs. Most of these other animals became extinct in the Triassic, in one of two events. First, at about 215 million years ago, a variety of basal archosauromorphs, including the protorosaurs, became extinct. This was followed by the Triassic–Jurassic extinction event (about 201 million years ago), that saw the end of most of the other groups of early archosaurs, like aetosaurs, ornithosuchids, phytosaurs, and rauisuchians. Rhynchosaurs and dicynodonts survived (at least in some areas) at least as late as early –mid Norian and late Norian or earliest Rhaetian stages, respectively, and the exact date of their extinction is uncertain. These losses left behind a land fauna of crocodylomorphs, dinosaurs, mammals, pterosaurians, and turtles. The first few lines of early dinosaurs diversified through the Carnian and Norian stages of the Triassic, possibly by occupying the niches of the groups that became extinct. Also notably, there was a heightened rate of extinction during the Carnian pluvial event.