The closest living relatives to modern flamingos are, surprisingly, the grebes. But this relationship is especially ancient, with their last common ancestor probably living sometime between the end of the Cretaceous and the early Eocene.
Such an ancestor is thought to have been a highly aquatic swimming bird, more grebe-like than flamingo-like, but there are few fossils of intermediate forms between that and the modern wading flamingos – with the exception of a group known as the palaelodids.
Palaelodus ambiguus here lived about 29-12 million years ago in Europe, from the early Oligocene to the mid-Miocene. It was similar in size to a small flamingo at about 80cm tall (2’7″), but had proportionally shorter legs and appears to have been capable of both wading and swimming in different depths of water, leading to its nickname of “swimming flamingo”. (Even though modern flamingos do occasionally swim too!)
Its straight pointed beak also suggests it had a much less specialized diet than its modern cousins, probably feeding on small aquatic animals like snails, insect larvae, and fish.
Various other palaelodid species have been found all around the world – even as far as New Zealand – so they seem to have been incredibly common and successful birds during their time. The last definite remains of this group come from the late Miocene, about 7 million years ago, although one Australian fossil may represent a late-surviving relict population that existed until just half a million years ago in the mid-Pleistocene.