Dinosaurs appeared around 231 mya (21 million years after the beginning of the Mesozoic). They evolved from early reptiles called the archosaurs (a group of which modern birds and crocodiles are still part).