Historical patterns of species diversity inferred from phylogenies typically contradict the direct evidence found in the fossil record. According to the fossil record, species frequently go extinct, and many clades experience periods of dramatic diversity loss. However, most analyses of molecular phylogenies fail to identify any periods of declining diversity, and they typically infer low levels of extinction. This striking inconsistency between phylogenies and fossils limits our understanding of macroevolution, and it undermines our confidence in phylogenetic inference. Here, we show that realistic extinction rates and diversity trajectories can be inferred from molecular phylogenies. To make this inference, we derive an analytic expression for the likelihood of a phylogeny that accommodates scenarios of declining diversity, time-variable rates, and incomplete sampling; we show that this likelihood expression reliably detects periods of diversity loss using simulation. We then study the cetaceans (whales, dolphins, and porpoises), a group for which standard phylogenetic inferences are strikingly inconsistent with fossil data. When the cetacean phylogeny is considered as a whole, recently radiating clades, such as the Balaneopteridae, Delphinidae, Phocoenidae, and Ziphiidae, mask the signal of extinctions. However, when isolating these groups, we infer diversity dynamics that are consistent with the fossil record. These results reconcile molecular phylogenies with fossil data, and they suggest that most extant cetaceans arose from four recent radiations, with a few additional species arising from clades that have been in decline over the last ∼10 Myr.I nferring rates of speciation and extinction and the resulting pattern of diversity over geological time scales is one of the most fundamental but challenging questions in biodiversity studies (1-4). Traditionally, biologists have relied on the fossil record to study long-term diversity dynamics (4-7). However, many groups, including terrestrial insects, birds, and plants, lack an adequate fossil record. Methods have therefore been developed to estimate speciation and extinction rates and test hypotheses about the mechanisms governing diversification using phylogenies of extant species reconstructed from molecular data (1,(8)(9)(10)(11)(12)(13)(14). These methods have raised the possibility of inferring diversity dynamics for groups that lack a detailed fossil record.Given the large number of taxonomic groups that lack fossil data, approaches that rely on extant taxa alone are critically important. However, recent studies have highlighted major inconsistencies between the diversity dynamics inferred from phylogenies and those dynamics inferred from the fossil record (4,11,15). For example, the fossil record clearly shows that the diversity of cetaceans has declined over the last 10 Myr (4, 16), whereas two recent phylogeny-based maximum likelihood analyses of this group would suggest that cetacean diversity has been expanding (17, 18). More generally, phylogeny-bas...