Clues hidden in ancient moa dung has allowed scientists to peer back hundreds of years into New Zealand's natural history.
The new insights, published today, reveal how New Zealand's long-extinct moa once feasted on a range of fungi and mushrooms.
The findings also hold important implications for conserving species today.
Although moa were hunted to oblivion soon after the arrival of humans here in the 13th century, the study of their preserved dung, or coprolites, has allowed researchers to learn much about our ancient ecosystems.
The ancient dried dung used in the study originated from four species of extinct giant moa and the critically endangered kakapo parrot, and contained genetic records of diet, pathogens, and the behaviour of the birds.
Such detailed pictures of the pre-historic ecosystem are critical for present-day ecological restoration efforts - yet are not available from the conventional fossil record of preserved skeletons.
The dung samples were excavated from caves and rockshelters across New Zealand by Dr Jamie Wood of Landcare Research.
"Coprolites were actually more common than we'd thought, once we started looking for them," Wood said.
"And it turns out they contain a huge range of important information about past ecosystems."
The study's lead author, Landcare PhD student Alex Boast, said a key finding was that the giant birds ate a wide range of mushrooms and fungi, including species that are critical for the beech forests that are widespread across the country.
The brightly coloured mushrooms remain distinctive parts of these forests today, but were eaten and then distributed by moa before the giant flightless birds became extinct.
"Worryingly, introduced mammals which consume these mushrooms don't appear to produce fertile spores, so this critical ecosystem function of the giant birds has been lost – with serious implications for the long-term health of New Zealand's beech forests."
The research, featuring in the journal Proceedings of the National Academy of Sciences, was carried out at University of Adelaide's Australian Centre for Ancient DNA.
"Moa coprolites contained a surprising diversity of parasites, many completely new to science," the centre's Dr Laura Weyrich said.
Several parasites appeared to be specialised to single moa species, so that a range of parasites became extinct with each moa species.
"As a result, we have probably underestimated the loss of biodiversity associated with the extinction of the megafauna."
ACAD director and study leader Professor Alan Cooper said the wide diversity of DNA retrieved from the dung allowed the team to reconstruct many aspects of the behaviour and interactions of species never seen before.
"This important new method allows us to see how prehuman ecosystems have been altered, which is often hard to identify, and to guide our efforts in correcting some of the resulting damage."
The findings come days after scientists at Harvard University published a draft study describing, for the first time, the nuclear genome, or make-up, of the moa.
One of the biggest insights of that work was that moa likely didn't become wingless due to gene loss - something leading moa expert Professor Trevor Worthy said made any attempt at resurrection even less plausible.