A new dyrosaurid is described from the Ypresian of the phosphatic deposits of the Oulad Abdoun Basin of Morocco. It is based on numerous cranial and postcranial remains, allowing an almost complete reconstruction. This new Dyrosaurus species, Dyrosaurus maghribensis sp. nov., is currently only known from Morocco. It differs from D. phosphaticus, present in contemporaneous levels of Algeria and Tunisia, by several autapomorpies, including a smooth dorsal margin of the parietal and widely opened choanae. A phylogenetic analysis, using 47 taxa and 234 morphological characters, shows the dyrosaurids as the sister taxon of pholidosaurids, which include Elosuchus, Sarcosuchus, Terminonaris and Pholidosaurus, and the thalattosuchians. Goniopholididae is a non-monophyletic group; however, if dyrosaurids are not included in the analysis, the result differs and the goniopholidids form a distinct clade. If Thalattosuchia is excluded, both Goniopholididae and Pholidosauridae become paraphyletic assemblages. Thus, phylogenetic problems remain with respect to longirostrine clade, and more attention should be paid to resolving their evolutionary relationships amongst the crocodyliforms. © 2006 The Linnean Society of London, Zoological Journal of the Linnean Society, 2006, 148, 603–656.