Abstract The Jebel Qatrani sequence found in the Fayum region of Egypt samples the richest Paleogene mammalian fauna of Africa, including some of the earliest anthropoid primates. The paleoecology of the Fayum has been interpreted as either a woodland–bushland or a lowland evergreen tropical forest, although the issue of changing ecological conditions through time has never been investigated. The Fayum fossils can be grouped into four successive and stratigraphically distinct faunal assemblages. Each of these mammalian assemblages is compared with modern mammal communities. Six communities from modern African forest habitats and six communities from woodland–bushland habitats are used to produce typical models of ecological diversity. An ecological spectrum for each modern community is generated by assigning mammal species to categories of taxonomic, diet, and body size diversity. Modern forest communities have a higher diversity of rodents and primates, a high diversity of frugivores, low diversity of grazers, and show a steep gradient in body size distribution from a high diversity of small species towards a low diversity of large species. Woodland–bushland communities have a higher diversity of ungulates and carnivores, a low diversity of frugivores but a high diversity of grazers, and a more even body size distribution. Diversity spectra from the four successive Fayum fossil assemblages are compared with the models derived from the modern mammal communities. The Fayum assemblages show similarities to modern forest habitats in patterns of diet diversity and to modern woodland–bushland habitats in body size diversity. More detailed analyses of taxonomic diversity suggest that the lowermost assemblages were different in ecological structure from modern habitats, while the uppermost assemblage shows strong resemblances to modern humid tropical forests.