Knowledge of extinct herbivore community structuring is essential for assessing the wider ecological impacts of Quaternary extinctions and determining appropriate taxon substitutes for rewilding. Here, we demonstrate the potential for coprolite studies to progress beyond single-species diet reconstructions to resolving communitylevel detail. The moa (Aves: Dinornithiformes) of New Zealand are an intensively studied group of nine extinct herbivore species, yet many details of their diets and community structuring remain unresolved. We provide unique insights into these aspects of moa biology through analyses of a multispecies coprolite assemblage from a rock overhang in a montane river valley in southern New Zealand. Using ancient DNA (aDNA), we identified 51 coprolites, which included specimens from four sympatric moa species. Pollen, plant macrofossils, and plant aDNA from the coprolites chronicle the diets and habitat preferences of these large avian herbivores during the 400 y before their extinction (∼1450 AD). We use the coprolite data to develop a paleoecological niche model in which moa species were partitioned based on both habitat (forest and valley-floor herbfield) and dietary preferences, the latter reflecting allometric relationships between body size, digestive efficiency, and nutritional requirements. Broad ecological niches occupied by South Island giant moa (Dinornis robustus) and upland moa (Megalapteryx didinus) may reflect sexual segregation and seasonal variation in habitat use, respectively. Our results show that moa lack extant ecological analogs, and their extinction represents an irreplaceable loss of function from New Zealand's terrestrial ecosystems. L arge herbivores are integral components of terrestrial ecosystems, playing a major role in shaping the structure and composition of vegetation communities and providing vital ecosystem functions such as seed dispersal (1, 2). Over the last 50,000 y, large herbivore populations on most landmasses have either gone extinct or been decimated (3), often with significant consequences for local vegetation communities (1, 4, 5). Paleodietary data for extinct large herbivores, and an understanding of how prehistoric large herbivore communities were structured, are therefore important for assessing the full ecological impact of Late Quaternary extinctions. Such information can provide a baseline for attempts to restore the lost ecological functions once provided by extinct herbivores (6). Coprolites provide the strongest potential resource for directly studying the diets and community structure of extinct species. Coprolites of extinct large herbivores have been found in dry caves across the world (7-12), but for most, the herbivore's identity has only been inferred from associated skeletal remains. Identification of large herbivore coprolites using ancient DNA (aDNA) has thus far been restricted to moa (9) and a limited number of ground sloth (Nothrotheriops shastensis) samples (13). However, this approach offers the possibility of detecting hidde...