In recent years the Middle Atlas of Morocco has become an area of interest for the study of dinosaurs in northern Africa. The Boulahfa locality, near Boulemane, has produced a diverse dinosaur assemblage from the Middle Jurassic of the El Mers Group. Fossil remains of sauropods and thyreophorans, such as ankylosaurs (Spicomellus) and stegosaurs (Adratiklit), have been reported so far in this region. Here, we describe a new partial thyreophoran skeleton found in the gray marls of the El Mers III Formation (Bathonian-? Callovian), which mainly consists of disarticulated dorsal vertebrae and ribs, and associated dermal armour elements. Axial characters (e.g., elongated pedicels of the dorsal neural arches; upturned transverse processes and dorsal ribs with straight axes suggesting a narrow ribcage) indicate that the specimen belongs to a medium to large-sized stegosaur. The dorsal vertebrae show differences with those of Adratiklit, whose material has been found at the same stratigraphic levels. Thyreosaurus atlasicus gen. et sp. nov. is characterized by a remarkable dermal armour, which consists of thick (up to 4 cm) subovate to subrectangular-shaped osteoderms. The asymmetrical texture of their sides, one roughly ornamented with small pits and fiber bundles, the other with a well-marked cross-hatched pattern, is clearly different from that observed to date in other stegosaurs (and ankylosaurs). The bone histology of these osteoderms is reminiscent of that of stegosaurian tail spines. It is interpreted that these osteoderms were arranged in a recumbent position over the body of the animal, instead of an erect position. The holotype corresponds to an adult individual who did not reach its maximum body size (estimated body length 6 m). The phylogenetic analysis suggests that Thyreosaurus is closely related to Dacentrurus within Dacentrurinae. The recent discoveries of Adratiklit and Thyreosaurus provide insight into the early evolution of stegosaurs in the Middle Jurassic of Africa.