The 1980 animated feature film Animalympics featured an ice-skating flamingo who competed for gold against a whole range of other sporting animals. In the second edition of BBC nature programme Planet Earth II, this cartoon seemed to have turned into reality. Sort of. The flocks of flamingos filmed high in the Andes Mountains were certainly skating along on their frozen pools, though they didn’t quite provide a medal-winning performance.

For a bird as fragile-looking as the flamingo, this bleak, icy wetland would seem a strange place to call home. Yet many of them do, and Planet Earth features two of my favourite species: the Andean flamingo (Phoenicoparrus andinus) and the James’ flamingo (P jamesi), also known as the puna flamingo, after the local term for these high plateaus. The Andean is the rarest of the six flamingo species, with fewer than 40,000 remaining in the wild.

Their movements and breeding cycles are hard to predict and tricky to study. So vast is the Andes plateau that the James’ flamingo was considered extinct until 1956 when it was suddenly rediscovered in Bolivia’s remote Laguna Colorada (Red Lake), 4,000 metres above sea level. Flamingos do a good disappearing act; whole flocks will vanish overnight as they travel between mountain lakes searching for the best food supply.

Flamingos thrive in inhospitable conditions

The author studies the social lives of these Andean flamingos. Paul Rose, Author provided

Flamingos are often associated with tropical beaches, palm trees and piña coladas. But this is far from the truth. All six species are highly adapted to living in inhospitable and unfriendly environments such as very salty or very alkaline wetlands. More than a million lesser flamingos breed in Tanzania’s Lake Natron, for instance, a lake fed by hot springs with water so alkaline that it can strip away human skin (one pioneering flamingo researcher named Leslie Brown spent months in Nairobi General Hospital after burning his legs wading out to observe where the birds nested).

Yet flamingos thrive in conditions like these. And they thrive because, in each location, they have discovered an untapped food source they can collect with little competition from other species.

Flamingos have very specialised diets. And their food is responsible for their famous pink colouration. The two species in Planet Earth II eat a lot of floating microscopic algae, which contains carotenoid pigments, the same types of chemical that make carrots orange. These pigments turn their feathers pink, orange and red – without them, flamingos would be white.

The only feathers on the birds that do not get stained pink are their black wing feathers. Flamingos are heavy birds and black primary feathers are more resistant to wear-and-tear.

Flamingos do everything together – even breeding

As the wetlands in which they find their carotenoid pigments are few and far between, flamingos really do have to bump along in a crowd. But they have used this restriction on habitat choice to their advantage. Evolution has moulded them into a highly gregarious species, and the organised society that flamingos live in is integral to their whole way of life.

This even extends to reproduction. To feel comfortable enough to breed, as many birds as possible need to be “in the mood” at once. The wonderful footage of the Andean flamingos promenading across your TV screen is part of getting everyone focused on reproduction.

It takes a lot of time and effort to rear a flamingo chick, and success is greatest if the whole flock breeds as one. Because environmental conditions are not always perfect, flamingos will delay breeding until they feel it is worth the effort.

And if this is your reproductive strategy then you need to live for quite a while. Flamingos take this to extremes. The world’s oldest bird, a greater flamingo (Phoenicopterus roseus) died in Adelaide Zoo in 2014 aged 83, and wild flamingos have been clocked into their fifties.

Andean flamingo at Slimbridge, 1961. Many of this first group are still alive. WWT

The Andean flamingos I study at the Wildfowl and Wetlands Trust in Slimbridge, Gloucestershire, have been around since the 1960s and are still going strong. The birds are all ringed so I am able to tell them apart and identify the real characters in the group. I’m fascinated by the soap opera of their individual social lives and have made this the key focus of my research.

The combination of erratic, collective reproduction and long lifespans has served flamingos well for many years. But the birds cannot always cope with human-caused changes to climate, alterations to wetland systems, and encroachment into their feeding and breeding areas. Some populations are in decline and their unique breeding cycle means recovery will be a long, slow process at best.

Paul Rose, Associate Fellow, Centre for Research in Animal Behaviour, University of Exeter.

This article first appeared on The Conversation.