Since the Quaternary extinction event in which the world lost some 50 percent of its large mammal species, many crucial links in the food chain have gone missing. Figuring out exactly what this has done to the world we’re living in now is something paleoecologists have been trying to figure out for a good half-century. Like anything to do with ecology, the problem of how missing megafauna affect modern-day habitats is a complex puzzle, with multiple lines of evidence. First you have to figure out who ate what and where, in what season and in what quantity. And if you want to do that, the best place to look is ancient poop.

In the past few years, a group of researchers in New Zealand led by the paleoecologist Jamie Wood have succeeded in using ancient droppings to reconstruct the world of the giant moa, one of a group of large flightless birds that includes the ostrich, emu, cassowary, and Madagascar’s extinct elephant birds. From the fossil record, we know there were at least nine species of moa on New Zealand. The smallest, the little bush moa, stood a little over four feet tall. At 12 feet with its neck outstretched, the largest, the giant moa, may have been the tallest bird that ever lived. In between these two extremes, moas came in a range of sizes and forms, adapted for a range of habitats.

Before the arrival of human beings, New Zealand was a paradise of birds. When it started drifting away from its parent supercontinent of Gondwana some 85 million years ago, it only carried with it a few primitive mammals. In time, they went extinct, as did the dinosaurs. With 2,000 miles between it and the next nearest landmass, the only group that could repopulate New Zealand were the birds. Over millions of years, they evolved to occupy most of the available ecological niches (they were joined later by bats, who took the place mice occupy in most terrestrial ecosystems). Birds functioned as the only major predators and herbivores. They were New Zealand’s antelopes, cheetahs, and giraffes.

New Zealand’s plants evolved in concert with its birds. An unusual number of the islands’ bushes and trees have what’s called a divaricating pattern of growth. The branches of these plants grow at wildly offset angles, creating an impenetrable mesh of interwoven twigs. Growing this way costs a lot of energy—the plants lose precious sunlight by creating their own shade—but it makes for an effective defense against a large, toothless herbivore like the moa. But now, with the moa gone and replaced by mammalian herbivores (mostly sheep), they find themselves defenseless.

New Zealand is a perfect place to study the effects of megafauna on their landscape. For one, the megafauna stayed around until very recently. Giant moas were happily foraging for tree-fern buds while the Magna Carta was being signed and the Florentines were building Brunelleschi’s dome. Two, it was quite varied: Nine species of moa coexisted on the islands, each (presumably) with its own habits and ecological niche. And three, all those moas left a lot of poop. People have been finding it in caves since the 1870s. Natural-history museums have over 2000 specimens on file, from 30 localities, with more waiting to be discovered.