Stegosaurian dinosaurs have a quadrupedal stance, short forelimbs, short necks, and are generally considered to be low browsers. A new stegosaur, Miragaia longicollum gen. et sp. nov., from the Late Jurassic of Portugal, has a neck comprising at least 17 cervical vertebrae. This is eight additional cervical vertebrae when compared with the ancestral condition seen in basal ornithischians such as Scutellosaurus. Miragaia has a higher cervical count than most of the iconically long-necked sauropod dinosaurs. Long neck length has been achieved by 'cervicalization' of anterior dorsal vertebrae and probable lengthening of centra. All these anatomical features are evolutionarily convergent with those exhibited in the necks of sauropod dinosaurs. Miragaia longicollum is based upon a partial articulated skeleton, and includes the only known cranial remains from any European stegosaur. A well-resolved phylogeny supports a new clade that unites Miragaia and Dacentrurus as the sister group to Stegosaurus; this new topology challenges the common view of Dacentrurus as a basal stegosaur.