Whales belong in the ocean, right? That may be true today, but cetaceans (whales, dolphins, porpoises) actually descended from four legged mammals that once lived on land. New research published in Current Biology reports the discovery in Peru of an entirely new species of ancestral whale that straddled land and sea, providing insight into the weird evolutionary journey of our mammalian friends.

We might think of them as smooth, two-flippered ocean swimmers that struggle to even survive the Thames, but whales originated more than 50m years ago from artiodactyls – land-dwelling, hooved mammals.

Initially, whales’ ancestors resembled small deer, with four toes, each one ending in a small hoof. One particular fossilised “missing link” found in India suggests that the last whale precursors took to the water in times of danger but came onto land to give birth and eat. They would spend considerable time wading in shallow water, foraging for aquatic vegetation and invertebrates, and eventually small fish and amphibians.

The oldest prehistoric whale fossils date from 53m years ago, and were found at sites in the northern Indian Himalayas, and present day Pakistan. The fossil record tells the story of a gradual transition from wading to living most of the time in deeper water, like otters or beavers, while retaining the ability to walk on land.

Around 42 million years ago, and still land-worthy, the newly discovered Peregocetus pacificus set off on an epic journey to the other side of the world. In the Middle Eocene era (roughly 48 to 38m years ago), Africa and South America were half as far apart, but that is still an impressive swim? for an animal less than three metres long that was not completely adapted to marine life.

The hind limbs of 42.6m-year-old P. pacificus were not much shorter than its front legs, and it had tiny hooves on each toe and finger, suggesting that it was still quite capable of hoisting itself out of the water and trotting about on land. However, other features of the skeleton suggest that it was well adapted to an aquatic life. For example, its hind feet bones had ridges to which ligaments and tendons would attach, suggesting it had webbed feet. Its beaver-like tail bones bear signs that it was used as a powerful aid to swimming, though there is no evidence as to whether or not it had a tail fluke like today’s whales.

P. pacificus was carnivorous, as its sharp, scissor-like teeth demonstrate. It likely ate large bony fish, as many whales do today. P. pacificus, however, has teeth that resemble those of modern carnivores, with canines, pre-molars and molars that have complex cusps. Today’s exclusively aquatic cetaceans all have a row of many, simple, peg like teeth, and they don’t chew their prey, instead just grabbing and swallowing it whole.

Over millennia, the pelvic bones uncoupled from the spine to enable more efficient swimming, while increased time in buoyant, gravity-easing water reduced the allocation of evolutionary resources to strong, weight-bearing legs. Front limbs morphed into flippers, while increasingly vestigial hind limbs shrunk and disappeared.

Modern whales have of course long since returned to the oceans from which the first land mammals’ distant ancestors emerged. All that remains of their evolutionary foray onto land are tiny remnants of bone attached to the pelvis in some species, an anatomical echo of their ancestors’ land adventures. But who’s to say where they’ll be roaming in another 50m years?

This article was originally published on The Conversation