Media playback is unsupported on your device Media caption Conservationists hope to save a species of duck called the Madagascar pochard from extinction

The rarest bird in the world - a species of duck called the Madagascar pochard - has been given a new home in time for the new year.

An international team of researchers released 21 of the birds at a lake in the north of Madagascar.

It is a step towards the recovery of a species that just over a decade ago was thought to be extinct.

Rescuing the species could also be a first step in protecting Madagascar's threatened wetlands.

Why is this species under such threat?

When it wasn't seen for 15 years, the Madagascar pochard was believed to have been wiped out completely. Then a tiny group of the birds was rediscovered in 2006 at one remote lake.

These were the last 25 Madagascar pochards on the planet.

Image copyright WWT Image caption The captive-bred pochards are now settling in to their new home

Wetland habitats in the country have been so polluted and damaged that these few remaining birds had been forced into this last untouched area.

But, as Rob Shaw, head of conservation programmes at the Wildfowl and Wetlands Trust (WWT) explained to BBC News, they were only "clinging on to existence in a place not really suited to them".

Their last pristine refuge was too deep and too cold for the pochards to thrive.

"The threats that they face across the rest of Madagascar - and why they've been wiped out so extensively - are vast," explained Rob Shaw.

"They range from sedimentation, invasive species, pollution, poor agricultural practises - a whole suite of problems that create the perfect storm making it very difficult for a species like the Madagascar pochard to survive."

How has the species been rescued?

Image copyright WWT Image caption Breeding the ducks in captivity has been key

In a painstaking effort - it has taken more than a decade of work. The international team, which included WWT, Durrell Wildlife Conservation Trust, The Peregrine Fund and the Government of Madagascar, rescued a clutch of pochard eggs and raised them in captivity.

Image copyright WWT Image caption Floating aviaries have been installed at Lake Sofia to protect the ducks

They then scoured Madagascar for the best site to bring the captive-bred birds back to the wild, settling on Lake Sofia in the north of the country.

The team has worked closely with the local communities around the lake that rely on its water, fish and plants, as WWT's Nigel Jarrett explained: "It takes a village to raise a child, so the old African proverb goes - but in this case it has taken a village to raise a duck. We have been preparing for this moment for over a decade.

"Working with local communities to solve the issues which were driving this bird to extinction has been essential to giving the pochard a chance of survival."

The team hopes that making this reintroduction a success - and bringing back a bird that was on the very brink of extinction - will provide a powerful example, not just for how to save the most threatened species but how communities can support both people and wildlife in such valuable habitats, even in areas of significant poverty.

Follow Victoria on Twitter