Understanding the spatiotemporal distribution and evolutionary dynamics of taxa and their drivers is central in biology. This holds true for extant lineages that have a deep evolutionary history and that have undergone several environmental and geological changes. While open-access databases have enhanced the study of biodiversity patterns in deep time, assessments often overlook regional-scale factors, and existing methods do not fully address uncertainties in the fossil record. We applied a capture-mark-recapture model with data augmentation to a dataset of 4,116 records of 531 genera of non-mammaliaform cynodonts, non-mammalian Mammaliaformes, and Mammalia sourced from the Palaeobiology Database. Our objectives were to estimate taxonomic diversity and origination, persistence and genus detection probability for each group from the late Paleozoic to the late Mesozoic, identify shifts in diversity and diversification across geological stages, and discern the primary global and tropical region-specific factors influencing origination and persistence probabilities. The observed numbers of cynodont, mammaliaform and mammal genera (100, 44, and 387, respectively) were lower than the estimated values (564, 247, and 1,171). Cynodont diversity increased in the early Triassic, peaked in the Carnian stage, then declined. Mammaliaformes and Mammalia showed a distinct dynamic, with Mammaliaformes peaking in diversity in early Jurassic, and Mammalia in the late Cretaceous. Shifts in diversification rates frequently coincided with boundaries between geological stages. Precipitation and global land area were influential for all taxonomic groups, positively affecting origination and negatively impacting persistence. Tropical region-specific factors exhibited group-dependent effects. Our study reveals a much higher taxonomic diversity of each group than previously reported, and shows that in a greenhouse world under shallow temperature gradients, precipitation and land area determine lineage diversity and diversification. We provide a more nuanced understanding of biodiversity patterns in deep time, contributing valuable insights for the study of evolutionary biology and paleoecology.