Overwhelming fossil evidence of dinosaurs indicates that these reptiles inhabited terrestrial environments and were initially bipedal (two-footed). Then, as dinosaurs evolved, some became quadrupedal, walking on four legs. Other ancient nondinosaur reptiles, though, branched off phylogenetically from the reptilian family tree and adapted to aquatic environments (for example, ichthyosaurs, mesosaurs, and plesiosaurs). Until now, no dinosaurs were known to have lived in aquatic settings. However, recent analyses of the skeletal remains of Spinosaurus aegyptiacus—a unique theropod dinosaur (clade Saurischia) with a propulsive, oarlike tail—have shown anatomical adaptations consistent with a predominantly aquatic lifestyle that was likely similar to that of present-day crocodiles and alligators. See also: Adaptation (biology); Crocodylia; Dinosauria; Evolution; Evolution of theropod dinosaurs; Fossil; Ichthyopterygia; Mesosauria; Phylogeny; Plesiosauria
About 112 to 93.5 million years ago, dinosaurs belonging to the genus Spinosaurus inhabited northern Africa from Morocco to Egypt. At that time, the region had not yet become a desert; instead, it was a lush, wet area with numerous river systems. Initially discovered in western Egypt in 1912, paleontologists found the most significant skeletal remains of S. aegyptiacus among Saharan rock deposits—the Kem Kem fossil beds—in southeastern Morocco in late 2018. After comprehensive investigations, including modeling projected undulatory forces and thrust that the tail bones of Spinosaurus were capable of generating, paleontologists have concluded that S. aegyptiacus was predominantly a swimming predator and, thus, the first dinosaur to be identified as living in an aquatic environment. See also: Africa; Bone; Desert; Paleoclimatology; Paleontology; Skeletal system
Spinosaurus aegyptiacus is also one of the lengthiest theropod dinosaurs to be identified, capable of reaching at least 15 m (49 ft) long. Fossil specimens of Spinosaurus discovered prior to 2018 indicated possible adaptations for a partially aquatic lifestyle that included a piscivorous (fish-eating) diet, but that evidence was too scanty for investigators to make any definitive conclusions. Some researchers entertained the idea that Spinosaurus might have fed in shallow waters, but still lived predominantly on land. However, the massive oarlike tail—measuring 5 m (16 ft) long—from the 2018 discovery was flexible and therefore capable of extensive lateral excursion. Moreover, the vertebrae of the tail possess meter-long spines that suggest anatomical formation of an expanded paddle-like structure that would have allowed a wide range of sideways swinging motions. Finally, the 2018 fossil evidence was excavated from ancient freshwater sedimentary rocks that included the remains of other aquatic animals (for example, lobefin coelacanth fishes), providing additional corroboration for the dinosaur's aquatic way of life. See also: Coelacanthiformes; Sedimentary rocks