Kiwi, the iconic flightless bird of New Zealand, is not a migrant from Australia, a new DNA study conducted by the University of Adelaide said, adding that the chick-sized Kiwi’s closest relative is an extinct giant bird of Madagascar, and not the Australian emu as was previously thought.

According to the study, published in the journal Science on Friday, the tiny kiwi is closely related to the elephant bird of Madagascar, a flightless giant that stood nearly 10 feet tall and weighed more than 600 pounds. The study also concluded that both the kiwi and the elephant bird, which went extinct a few centuries ago, once flew.

“This result was about as unexpected as you could get,” Kieren Mitchell of the University of Adelaide's Australian Centre for Ancient DNA, or ACAD, said, in a statement. “New Zealand and Madagascar were only ever distantly physically joined via Antarctica and Australia, so this result shows the ratites must have dispersed around the world by flight.” 

Giant birds, such as the emu and ostrich, fall under a broad category of giant flightless “ratite” birds, which also contains some of the world's largest birds, including the extinct giant moa of New Zealand and the elephant birds of Madagascar.

As part of the study, the researchers examined ancient DNA extracted from the bones of two elephant birds and found a close genetic connection with the kiwi, despite significant differences in size, body shape and lifestyle. And because both birds lived nearly 7,000 miles apart, the researchers used the elephant bird DNA to estimate when the ratite species had separated from each other.

“The evidence suggests flying ratite ancestors dispersed around the world right after the dinosaurs went extinct, before the mammals dramatically increased in size and became the dominant group,” Alan Cooper of the University of Adelaide said, in the statement. “We think the ratites exploited that narrow window of opportunity to become large herbivores, but once mammals also got large, about 50 million years ago, no other bird could try that idea again unless they were on a mammal free island - like the Dodo.”

The researchers also said that they recently found fossils of small kiwi ancestors, which likely had the ability to fly, suggesting that kiwis were flying when they arrived in New Zealand.

“By the time it arrived in New Zealand, the large herbivore role was already taken by the moa, forcing the kiwi to stay small, and become insectivorous and nocturnal,” said Trevor Worthy of Flinders University in Adelaide.