By Helen Briggs
Science reporter, BBC News
The whale is descended from a deer-like animal that lived 48 million years ago, according to fossil evidence.
The animal was small, stocky and about the size of a raccoon
Remains found in the Kashmir region of India suggest the fox-sized mammal is the long-sought land-based ancestor of whales, dolphins and porpoises.
Research in Nature indicates the animal lived mainly on land but dived into water to escape predators.
Whales are known to be descended from land-dwellers but the "missing link" has been a mystery until now.
Although Indohyus, as it is known, looks nothing like the whales of today, it shares certain anatomical features.
The structures of its skull and ear are similar to those of early whales, and like other animals that spend a lot of time in water, it had thickened bones that provided ballast to keep its feet anchored in shallow water.
"We've found the closest extinct relative to whales and it is closer than any living relative," said study leader Professor Hans Thewissen of the Department of Anatomy at Northeastern Ohio Universities College of Medicine in Ohio, US.
Indohyus belongs to an ancient order of mammals that had two or four toes on each foot. Modern day representatives of the group include camels, pigs, and hippopotamuses.
DNA studies show that hippos are in fact closely related to modern whales. They do not appear in the fossil record, however, until about 15 million years ago, some 35 million years after the cetaceans originated in south Asia.
Hans Thewissen holding the skull of Indohyus
This led Professor Thewissen and his team to search for an older land-based ancestor that would fill in some of the gaps in our knowledge of the whale's dramatic evolutionary journey from land to sea.
After seeing loose teeth and fragments of jaw bones found by the late Indian geologist A Ranga Rao some 25 years ago, Professor Thewissen obtained rock samples from Rao's private collection. They harboured a treasure trove of complete Indohyus fossils, including skulls and leg bones.
The stable-oxygen-isotope composition of its teeth suggests the animal spent much of its time in water.
Some have assumed that the ancestor of whales first took to the water to feed on fish but the latest evidence suggests otherwise.
"The new model is that initially they were small deer-like animals that took to the water to avoid predators," Professor Thewissen told BBC News. "Then they started living in water, and then they switched their diet to become carnivores."
Although the behaviour and habits of Indohyus appear somewhat strange, there is a modern day parallel in the African mousedeer (chevrotain).
The mousedeer lives on land, but is known to leap into the water to avoid predators such as eagles.