Just a few centuries ago, Madagascar was home to a monstrous creature called the elephant bird. It towered as high as 9 feet. Weighing as much as 600 pounds, it was the heaviest bird known to science. You'd need 160 chicken eggs to equal the volume of a single elephant bird egg.

The only feature of the elephant bird that wasn't gigantic was its wings, which were useless, shriveled arms. Instead of flying, the elephant bird kept its head down much of the time, grazing on plants.

Scientists aren't precisely sure when this strange creature became extinct, but it probably endured well into our age.

In the Middle Ages, Marco Polo heard tales of a huge bird that stalked Madagascar. Today, scientists are trying to determine when the elephant bird became extinct by estimating the age of its youngest remains. It's possible the birds were still thundering across Madagascar in the 1800s.

Now that the elephant bird is gone, scientists have to content themselves with indirect clues to its existence. For a long time, they could only study its bones and fragments of eggshells. In the 1990s, some scientists began to look for bits of DNA in those elephant bird remains, but for two decades they came up dry.

Finally, a team of Australian researchers has now recovered sizable chunks of DNA from two species of elephant birds. And that genetic material has delivered a big surprise: It turns out that the closest relative of the mighty elephant bird is the kiwi, a 6-pound flightless bird that lives more than 7,000 miles away, in New Zealand.

Other experts accepted the finding, reported Thursday in the journal Science, although they didn't see it coming.

"I don't think anyone would have predicted kiwis," said Joel Cracraft, curator of ornithology at the American Museum of Natural History, who was not involved in the research.

The research isn't just prompting scientists to rethink the evolution of elephant birds. It's also fueling a debate about the origins of many of the world's best-known flightless birds, from ostriches in Africa to emus in Australia.

These birds, called ratites, are distinguished from other birds not just by their lack of flight but also by the distinctive arrangement of bones in their head.

Living ratites include the cassowaries of Australia and New Guinea, and the rheas of South America. Another giant ratite, the moa, lived on New Zealand until 600 years ago.

For more than a century, ratites have posed a kind of biological jigsaw puzzle. How did a group of flightless birds end up scattered across the Southern Hemisphere?

Continental drift a factor

In the 1970s, Cracraft proposed that the answer was continental drift. Two hundred million years ago, the southern land masses were all part of a single giant continent, known as Gondwana. Over millions of years, Gondwana broke into pieces that drifted apart. Those pieces carried away the flightless ratites that lived on them.

For evidence, Cracraft pointed to the timing of Gondwana's breakup. Africa was the first continent to peel away. Africa's ratites — ostriches — are the first lineage to have split from other ratites.

In the 1990s, scientists tested Cracraft's hypothesis through DNA comparisons of living species. They also searched for material from extinct moas and elephant birds.

Alan Cooper of the University of Adelaide retrieved the first moa DNA, and gradually other researchers found more. In 2008, Oliver Haddrath of the Royal Ontario Museum and his colleagues compared the moa DNA with those of other ratites and got a surprise. They found that the closest relative of the moa was a small flying bird from Central and South America called the tinamou.

That didn't make much sense if their common ancestor had already lost its wings.

This discovery made scientists all the more curious about secrets in elephant bird DNA. Cooper had tried and failed in the early 1990s to extract elephant bird DNA from fossils.

Since then, the technology for retrieving ancient DNA has become far more powerful. Scientists can now recover much smaller quantities of genetic material. So Cooper recently decided to have another go at the elephant bird bones.

This time he and his colleagues succeeded.

When scientists compared the elephant bird DNA to that of other birds, they were surprised to find that kiwis were the most closely related.

Date posed new questions

They could also estimate how long ago the two lineages shared a common ancestor by counting up the mutations that have accumulated in the kiwi and elephant bird DNA. They estimate that the ancestral bird lived 50 million years ago.

That date poses a serious problem to the idea that ratites have been flightless since the days of Gondwana. By 50 million years ago, Madagascar and New Zealand were already separated by an ocean.

"You can't get from Madagascar to New Zealand without flying," Cooper said. "There isn't any other way."

These findings have led Cooper and his colleagues to propose a new hypothesis for how ratites evolved. Rather than being flightless, their ancestor was a partridge-like bird that could travel by air. Between 65 million and 50 million years ago, early ratites flew across much of the world.

It was a lucky time for them. The large plant-eating dinosaurs had become extinct, and it would take millions of years before large plant-eating mammals would take their place. In at least six instances, Cooper argues, ratites evolved, losing their wings and becoming plant-eating birds.

Other experts don't think there is enough evidence yet to support this proposition. Haddrath said, "It's a very neat idea, but it's largely speculation."

Scientists are now gathering more DNA from both living and extinct birds, which will likely reveal more details.

"This won't be a mystery much longer," Cracraft said.