Miragaia (named after Miragaia, the parish in Portugal and geologic unit where its remains were found) is a genus of stegosaurid dinosaur. Its fossils have been found in Upper Jurassic rocks in Portugal. Miragaia is notable for its long neck, which included at least 17 vertebrae. Miragaia is based on ML 433, a nearly complete anteriorhalf of a skeleton with partial skull (the first cranial material for a European stegosaurid). Among the recovered bones were most of the snout, fifteen neck vertebrae (the first two, which articulated with the skull, were absent), the shoulder bones, most of the forelimbs, and thirteen bony plates. ML 433 was found in the Miragaia Unit of the Sobral Formation, Lourinhã Group, which dates to the late Kimmeridgian-earlyTithonian (Late Jurassic, approximately 150 million years ago). Octávio Mateus and colleagues describedMiragaia in 2009. The type species is M. longicollum("long neck"). A partial hip and partial vertebrae from a juvenile individual (ML 433-A) were found at the same location, and were also assigned to M. longicollum.Mateus and colleagues performed a phylogenetic analysis and found Miragaia to group withDacentrurus in a clade Dacentrurinae, the sister group to Stegosaurus. The most notable feature of Miragaia is its long neck, which was composed of at least 17 vertebrae. This represents the culmination of a trend of longer necks seen in stegosaurians. Additionally, Miragaia had more neck vertebrae than most sauropods, dinosaurs known for their long necks, which contrasts with the traditional view of stegosaurians as low browsers with short necks. Only the Chinese sauropods Euhelopus, Mamenchisaurus, and Omeisaurus had as many neck vertebrae as Miragaia, with most sauropods of the Late Jurassic possessing only 12 to 15. Mateus and colleagues suggested that the long neck either allowed Miragaia to browse at a level that other herbivores were not exploiting, or that the neck arose due to sexual selection. In sauropods, great neck length was achieved by a combination of three processes: incorporation of back vertebrae into the neck; addition of new vertebrae; and lengthening of the individual neck vertebrae. The long neck of Miragaiaappears to have resulted mostly from back vertebrae becoming incorporated into the neck, based on vertebral counts of other stegosaurians. There is currently no evidence that new vertebrae contributed to the neck; instead, the distribution of existing vertebrae in the back and neck changed. There is some evidence for increasing vertebral length in Miragaia and Stegosaurus, but this is equivocal and could be due to post-mortem distortion. Its total length is estimated at 5.5 – 6 metres (18-20 ft).