Pterosaurs were the first vertebrates to evolve powered flight and the largest animals to ever take wing. The pterosaurs persisted for over 150 million years before disappearing at the end of the Cretaceous, but the patterns of and processes driving their extinction remain unclear. Only a single family, Azhdarchidae, is definitively known from the late Maastrichtian, suggesting a gradual decline in diversity in the Late Cretaceous, with the Cretaceous–Paleogene (K-Pg) extinction eliminating a few late-surviving species. However, this apparent pattern may simply reflect poor sampling of fossils. Here, we describe a diverse pterosaur assemblage from the late Maastrichtian of Morocco that includes not only Azhdarchidae but the youngest known Pteranodontidae and Nyctosauridae. With 3 families and at least 7 species present, the assemblage represents the most diverse known Late Cretaceous pterosaur assemblage and dramatically increases the diversity of Maastrichtian pterosaurs. At least 3 families—Pteranodontidae, Nyctosauridae, and Azhdarchidae—persisted into the late Maastrichtian. Late Maastrichtian pterosaurs show increased niche occupation relative to earlier, Santonian-Campanian faunas and successfully outcompeted birds at large sizes. These patterns suggest an abrupt mass extinction of pterosaurs at the K-Pg boundary.