Several animals are commonly mistaken for dinosaurs. This is because these animals may be superficially similar to dinosaurs in that they are also reptilian and large, or lived at the same time as dinosaurs, but are not part of superorder Dinosauria. These animals include pelycosaurs like Dimetrodon(sail-backed reptiles that lived over 50 million years before dinosaurs became abundant), pterosaurs (flying reptiles that coexisted with the dinosaurs), plesiosaurs, pliosaurs (long-necked aquatic reptiles), ichythosaurs (another aquatic reptile with a fish-shaped body), and mosasaurs (huge aquatic reptiles that are the closest relatives of living snakes).
The official definition of dinosaur encompasses all erect-limbed archosaurs the relatives of the sprawl-limbed archosaurs, the crocodilians. So, in a sense, dinosaurs can be thought of as upright-standing crocodilians. However, this lineage never evolved to fly in the air or swim in the sea. Instead, these niches were occupied by other diapsid (two-holed skull) reptile lineages, especially plesiosaurs and pliosaurs. Towards the end of the Age of the Dinosaurs, ichthyosaurs and mosasaurs evolved and lived in the seas as well. Plesiosaurs existed in the seas for almost as long as dinosaurs existed on the land.
One reptile group that evolved at almost the same time as the first dinosaurs were the pterosaurs, formerly known as pterodactyls, flying reptiles that eventually developed wingspans as large as 10 m (33 ft). Among them were the largest flying animals of all time, like Quetzalcoatlus and Hatzegopteryx, though these wingspans were not typical, and the largest pterosaurs only evolved shortly before the end of the Cretaceous, when all dinosaurs went extinct.
Another important group sometimes confused with dinosaurs are the pterosaurs, sail-backed reptiles that lived in the Permian period, about 50 million years before the first dinosaurs walked the Earth. The pelycosaurs could grow up to 3 1/2 meters (11 ft) in length, though most were much smaller about 1 meter (3 ft) long. Pelycosaurs and other synapsids were only the second major group of tetrapods to dominate terrestrial ecosystems, after basal reptiles and giant amphibians that lived during the Late Carboniferous and Early Permian. Therapsids (Permian/Triassic) were the third, archosauromorphs (Early Triassic) were the fourth, and dinosaurs were only the fifth.