“Ankylosaurs were important megaherbivores of Jurassic and Cretaceous ecosystems. Their distinctive craniodental anatomy and mechanics differentiated them from coexisting hadrosaurs and ceratopsians, and morphological evidence suggests dietary niche partitioning between sympatric ankylosaurids and nodosaurids. Here, we investigate the skull biomechanics of ankylosaurs relative to feeding function. First, we compare feeding functional performance between nodosaurids and ankylosaurids applying finite element analysis and lever mechanics to the skulls of Panoplosaurus mirus (Nodosauridae) and Euoplocephalus tutus (Ankylosauridae). We also compare jaw performance across a wider sample of ankylosaurs through lever mechanics and phylogenetic comparative methods. Mandibular stress levels are higher in Euoplocephalus, supporting the view that Panoplosaurus consumed tougher foodstuffs. Bite force and mechanical advantage (MA) estimates indicate that Panoplosaurus had a relatively more forceful and efficient bite than Euoplocephalus. There is little support for a role of the secondary palate in resisting feeding loads in the two ankylosaur clades. Several ankylosaurs converged on similar jaw mechanics, while some nodosaurids specialised towards high MA and some ankylosaurids evolved low MA jaws. Our study supports the hypothesis that ankylosaurs partitioned dietary niches in Late Cretaceous ecosystems and reveals that the two main ankylosaur clades evolved divergent evolutionary pathways in skull biomechanics and feeding habits.” Available in Scientific Reports