On a ring-shaped reef in the Indian Ocean, a species of bird evolved to be flightless — twice.

Hundreds of thousands of years ago, white-throated rails (Dryolimnas cuvieri) flew from their native home in Madagascar to the Aldabra atoll, a ring-shaped reef among the Seychelle Islands. The reef, free of predators for the birds, was a comfortable place to call home — and as time passed, the rails lost their ability to fly.

But catastrophe struck about 136,000 years ago, when a major flood swept the atoll — and the flightless birds — beneath the waters of the Indian Ocean, leading to the birds' extinction. [Photos of Flightless Birds: All 18 Penguin Species]

But not all was lost: About 36,000 years after that, when the world was in the clutches of an ice age, sea levels fell, and the atoll reappeared at the water's surface. And after a while, something familiar happened: The antsy white-throated rails took off again from Madagascar and flew to the atol. Sometime after that, the birds, once again evolved out of their ability to fly.

This means that a single species, the white-throated rail, evolved to be flightless twice — a phenomenon known as "iterative evolution," according to a statement from the University of Portsmouth.

Scientists at the University of Portsmouth and the Natural History Museum, both in the U.K., came to this conclusion by comparing the bones of the ancient flightless Aldabra rails — both those that existed before and after the flood — to more recent birds. That includes the more modern bones of flying rails and the flightless Aldabra rails (Dryolimnas cuvieri aldabranus) that still live on the atoll today.

Wing bones of flightless (left) and flighted (right) Dryolimnas rails. (Image credit: Julian Hume)

The team found that the bones of the Aldabra rails that date back to before the flood were very similar to modern Aldabra rail bones.

What's more, the researchers found that the wing and ankle bones that date back to around 100,000 years ago, or around the time when the birds once again flew to the atoll after the flood, showed evidence that the animals were evolving towards flightlessness. Specifically, the ankle bone was stronger when compared to the same ankle bone in the flying birds, suggesting that the birds were getting heavier and losing their ability to fly, according to the National History Museum in the U.K.

"These unique fossils provide irrefutable evidence that a member of the rail family colonized the atoll, most likely from Madagascar, and became flightless independently on each occasion," lead researcher Julian Hume, an avian paleontologist at the Natural History Museum, said in the statement.

As to why these rails left Madagascar in the first place, it's still unclear. But every 50 to 100 years or so, factors such as overpopulation or decreasing food supply spark the mass migration of birds out from Madagascar in all directions across the Indian Ocean, according to the National History Museum. The lucky ones end up finding an island to their liking.

The researchers published their results on May 8 in the Zoological Journal of the Linnean Society.

Originally published on Live Science.