Here, we provide a comparative survey of the histology of postcranial dermal-armor osteoderms of ankylosaurs, including material of polacanthids (Polacanthus foxii, Gastonia sp.), ankylosaurids (e.g., Saichania chulsanensis, Pinacosaurus grangeri, Ankylosauridae indet.), and nodosaurids (e.g., Struthiosaurus austriacus, Nodosauridae indet.). Samples of osteoderm-bearing outgroups (Scelidosaurus harrisonii, phytosaurs, and crocodiles) as well as literature data on Stegosaurus stenops plates and spikes helped to elucidate histological evolution and character polarity.The complex histology of ankylosaur osteoderms seems to be of systematic value, as the sectioned osteoderms can be classified into three distinctive groups. All polacanthid osteoderms share a relatively generalized histology with a thickened, uniform cortex completely surrounding trabecular bone. Nodosaurid osteoderms only have an external cortex with the underlying internal spongiosa being much thicker and forming a rather flat base. Ankylosaurids have very thin osteoderms that were greatly strengthened by the incorporation of structural collagen fiber bundles, similar but not identical to Sharpey's fibers, into the thin primary cortex and, uniquely, the secondary bone tissue. Structural fibers are also abundant in nodosaurids but there are significant differences in arrangement and occurrence, being random in ankylosaurids but highly ordered in nodosaurids. In their cortex, the latter have two sets of 3D-orthogonal fibers rotated at 45° to each other. The combination of the greatly strengthened external cortex covering a thick cushion of cancellous bone thus serves to resist local penetration. Ankylosaurid and nodosaurid osteoderms are thus highly optimized towards a resistant yet light-weight armor.