This illustration shows what Peregocetus might have looked like. A. Gennari

A fossilized whale with four legs, webbed feet and hoofed toes is revealing new details about the evolution and geographical spread of whales across the globe.

Paleontologist Mario Urbina and his team discovered the fossil in 2011 along the coast of Peru, according to a study published Thursday in the journal Current Biology. They were able to recover most of its skeleton, including the jaw, legs, some of its spine and tail. The fossil is 42.6 million years old, dating back to the middle Eocene Epoch.

It's the oldest known whale found in that part of the world, and the most complete skeleton found outside of India and Pakistan. Scientists believe the creature — which resembled an otter — may have been an early form of whale that had not yet fully transitioned to living in water. The unusual discovery holds clues about how whales spread around the planet and indicates ancient whales settled in South America before North America.

The skeletons of the four-legged whale indicate it would have been at home on the land and in water. Lambert et al./Current Biology

The discovery team named the creature "Peregocetus pacificus," Latin for "the traveling whale that reached the Pacific."

Get Breaking News Delivered to Your Inbox

"This is the first indisputable record of a quadrupedal whale skeleton for the whole Pacific Ocean, probably the oldest for the Americas and the most complete outside India and Pakistan," said Dr. Olivier Lambert, who co-authored the study.

According to the surprisingly well-preserved fossil, the animal would have been around 11 feet long. It had a large tail and four legs with hoofed toes that were likely webbed, making the creature well-adapted to both land and sea.

Whales and dolphins were already known have adapted over the years from four-legged land animals as they transitioned to living in water. However, how they traveled from South Asia to South America remains a mystery.

Researchers suggest the creatures likely crossed the south Atlantic Ocean from the western coast of Africa, assisted by surface currents. Because Africa and South America were much closer together millions of years ago, the whales would not have had as much difficulty making the journey. Once settled in Pacific waters near Peru, they would eventually make their way to North America.