Image copyright A G Schmalstieg Image caption The birds co-operate to save crucial energy on a high-risk annual journey

Scientists have worked out how flocking birds solve the "social dilemma" of who leads the flock.

Researchers from the UK, Germany and Austria studied the northern bald ibis, tracking precisely how this species - like many large birds - maintains a "V" formation when migrating.

They found that birds took it in turns to take the very energy-depleting lead.

This allowed every bird to take advantage of extra lift produced by by the wings of the bird in front.

The findings are published in the Proceedings of the National Academy of Sciences.

The time bird A is in front of bird B correlates almost exactly with the amount of time it's the other way around - they're taking it in turns Bernhard Voelkl, University of Oxford

Lead researcher Bernhard Voelkl from the University of Oxford's department of zoology told BBC News that he wanted to know how the birds worked together to deal with the "very high cost" of migration.

"These birds go from Austria to Italy - a journey of 1,500km (930 miles)," he explained. "Mortality is really high - 30% of juveniles don't survive the first migration."

Working in pairs

The researchers were able to track each bird in a flock, thanks to a unique conservation project by the Waldrappteam in Austria, which has raised northern bald ibises, and trained them to migrate behind a microlight aircraft.

The aim of this unusual project is to bring the northern bald ibis back to Europe; the birds were wiped out by hunting, so the team is retraining the birds to navigate a migration route that has now been lost.

Data loggers containing GPS-based tracking devices, that the team fitted to each bird, meant the scientists could track their exact positions.

Media playback is unsupported on your device Media caption In a previous study of the same rare birds, Dr Steven Portugal and his colleagues revealed why birds fly in a V formation

Careful analysis of how and where the birds shifted position as they flew, showed that birds were working in pairs, repeatedly swapping around between follower and leader.

"What we saw was that, for each bird, there's a very clear correlation between the time it spent in front, and the amount of time it followed another bird," said Dr Voelkl.

"So the time bird A is in front of bird B correlates almost exactly with the amount of time it's the other way around; they're taking it in turns."

The researchers had expected that the birds would be co-operating in some way, but were surprised that the pattern was so clear and that the mechanism was so simple.

"It's crucial because these migrations are very tough for the birds," said Dr Voelkl. "And by reducing the amount of energy they use, they can really increase their [chance of] survival.

"They don't have to watch all the other birds in the flock - they just have to match to one other bird, so it's very simple, but also robust."

Dr Voelkl thinks this "pairwise matching" as he refers to it, is likely to be used by many more bird species that undertake exhausting annual journeys.

Follow Victoria on Twitter