After the mass extinction at the end of the Permian there were few large carnivores. One group of reptiles called archosaurs evolved into efficient predators to fill this role, eventually giving rise to the crocodiles and dinosaurs.
The earliest dinosaurs were small, lightly-built and fast-moving predators such as Coelophysis which was two or three metres long. Dinosaurs had an anatomical advantage over other archosaurs – they had legs directly beneath their bodies rather than splaying out to the side, allowing for more agile and efficient movement.